Repository navigation
Add Morse as an AI provider #3616
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,7 @@ const ( | |
| OpenRouterChatEndpoint = "https://openrouter.ai/api/v1/chat/completions" | ||
| NanoGPTChatEndpoint = "https://nano-gpt.com/api/v1/chat/completions" | ||
| GroqChatEndpoint = "https://api.groq.com/openai/v1/chat/completions" | ||
| MorseChatEndpoint = "https://inference.trymorse.ai/v1/chat/completions" | ||
| AzureLegacyEndpointTemplate = "https://%s.openai.azure.com/openai/deployments/%s/chat/completions?api-version=%s" | ||
| AzureResponsesEndpointTemplate = "https://%s.openai.azure.com/openai/v1/responses" | ||
| AzureChatEndpointTemplate = "https://%s.openai.azure.com/openai/v1/chat/completions" | ||
|
|
@@ -34,6 +35,7 @@ const ( | |
| OpenRouterAPITokenSecretName = "OPENROUTER_KEY" | ||
| NanoGPTAPITokenSecretName = "NANOGPT_KEY" | ||
| GroqAPITokenSecretName = "GROQ_KEY" | ||
| MorseAPITokenSecretName = "MORSE_KEY" | ||
| AzureOpenAIAPITokenSecretName = "AZURE_OPENAI_KEY" | ||
| GoogleAIAPITokenSecretName = "GOOGLE_AI_KEY" | ||
| ) | ||
|
|
@@ -125,6 +127,17 @@ func applyProviderDefaults(config *wconfig.AIModeConfigType) { | |
| config.APITokenSecretName = GroqAPITokenSecretName | ||
| } | ||
| } | ||
| if config.Provider == uctypes.AIProvider_Morse { | ||
| if config.APIType == "" { | ||
| config.APIType = uctypes.APIType_OpenAIChat | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Morse sends an Severity: medium 🤖 Was this useful? React with 👍 or 👎 |
||
| } | ||
| if config.Endpoint == "" { | ||
| config.Endpoint = MorseChatEndpoint | ||
| } | ||
| if config.APITokenSecretName == "" { | ||
| config.APITokenSecretName = MorseAPITokenSecretName | ||
| } | ||
| } | ||
| if config.Provider == uctypes.AIProvider_AzureLegacy { | ||
| if config.AzureAPIVersion == "" { | ||
| config.AzureAPIVersion = AzureLegacyDefaultAPIVersion | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,7 @@ | |
| "groq", | ||
| "openrouter", | ||
| "nanogpt", | ||
| "morse", | ||
| "openai", | ||
| "azure", | ||
| "azure-legacy", | ||
|
|
||
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.
Deep Code Review Agent🐛
This setup sends more than the typed prompt to the hosted
ai:endpoint: Widget Context is on by default, andGenerateCurrentTabStatePromptincludes the local username and open-widget details such as file paths and browser URLs. The Morse setup doesn’t disclose that Wave sends those details with the request, even before any tool runs.Severity: medium
🤖 Was this useful? React with 👍 or 👎