-
-
Notifications
You must be signed in to change notification settings - Fork 837
feat: add Novita AI as LLM provider #3109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Alex-wuhu
wants to merge
1
commit into
wavetermdev:main
Choose a base branch
from
Alex-wuhu:novita-integration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,6 +26,7 @@ | |
| "openai", | ||
| "azure", | ||
| "azure-legacy", | ||
| "novita", | ||
| "custom" | ||
| ] | ||
| }, | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
Novita AI OpenAI-compatible API docs: does Novita support/v1/responses, or is/v1/chat/completionsthe only supported generation endpoint? Please provide the official documentation URL.💡 Result:
Novita AI does not support the /v1/responses endpoint. The supported OpenAI-compatible generation endpoints are /v1/chat/completions and /v1/completions. No mention of /v1/responses appears in the official documentation across multiple pages. Official documentation URLs: - API Reference Overview: https://novita.ai/docs/api-reference/api-reference-overview (lists LLM APIs including Create Chat Completion and Create Completion) - LLM API Guide: https://novita.ai/docs/model-api/reference/llm/llm.html and https://novita.ai/docs/guides/llm-api (shows curl examples for /openai/v1/chat/completions and /openai/v1/completions) - List Models: https://novita.ai/docs/api-reference/model-apis-llm-list-models (compatible with OpenAI /v1/models)
Citations:
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 3747
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 180
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 1389
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 1428
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 6797
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 8505
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 3454
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 46
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 165
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 2840
Constrain Novita provider to OpenAI Chat API to prevent endpoint/request format mismatches.
Novita's OpenAI-compatible API only supports
/v1/chat/completionsand/v1/completionsendpoints—not/v1/responses. The current code defaults to Chat Completions but allowsai:apitypeto be manually set toopenai-responses, which would cause runtime 4xx failures if the request formatter doesn't match the actual endpoint.Suggested hardening
if config.Provider == uctypes.AIProvider_Novita { - if config.APIType == "" { - config.APIType = uctypes.APIType_OpenAIChat - } + // Novita only supports chat-completions; force to prevent APIType/endpoint mismatch. + if config.APIType == "" || config.APIType != uctypes.APIType_OpenAIChat { + config.APIType = uctypes.APIType_OpenAIChat + } if config.Endpoint == "" { config.Endpoint = NovitaChatEndpoint } if config.APITokenSecretName == "" { config.APITokenSecretName = NovitaAPITokenSecretName } if len(config.Capabilities) == 0 { config.Capabilities = []string{uctypes.AICapabilityTools, uctypes.AICapabilityImages} } }📝 Committable suggestion
🤖 Prompt for AI Agents