Skip to content

Conversation

OPAI-OP
Copy link

@OPAI-OP OPAI-OP commented Aug 29, 2025

Context

This PR adds the Submodel provider. Submodel offers a wide range of inference model services at competitive prices, with some models providing users with a daily free quota of 1M tokens or 200 requests.

Implementation

Core Integration Components:

  1. Dynamic Model Fetcher (src/api/providers/fetchers/submodel.ts)
  • /v1/models fetches real-time models from the Submodel endpoint.
  • Smart context window inference based on model name patterns.
  • Graceful fallback to static models if the API fails.
  1. WebView Message Handler Integration
  • webviewMessageHandler.ts is updated to include CometAPI in the router model fetch.
  • Proper authentication and error handling for API requests.

Screenshots

image
before after
Submodel was not supported. Submodel is supported.

How to Test

  1. Setup SubModel Integration:
  1. Verify Dynamic Model Loading:
  • Model dropdown should populate models
  1. Test Model Selection:
  • Select a model from the filtered list
  • Verify the selected model appears in the bottom-left corner of the main interface
  • Create a new task and confirm the selected Submodel is used
  1. Test Error Handling:
  • Try with an invalid API key - should show error status "401 Invalid API key"
  • Try without network connection - should gracefully handle failures

Get in Touch

Website: https://submodel.ai
Email: [email protected]
Discord: @masonf7695

Copy link

changeset-bot bot commented Aug 29, 2025

⚠️ No Changeset found

Latest commit: 7d2bc1a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@OPAI-OP
Copy link
Author

OPAI-OP commented Sep 4, 2025

I'd be grateful if teams could take a look this PR and provide your feedback when you have a moment.

Thanks so much for your time and help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant