feat: add Morpheus (mor.org) as LLM provider#360
Open
Bougey wants to merge 1 commit intobrowseros-ai:mainfrom
Open
feat: add Morpheus (mor.org) as LLM provider#360Bougey wants to merge 1 commit intobrowseros-ai:mainfrom
Bougey wants to merge 1 commit intobrowseros-ai:mainfrom
Conversation
Add Morpheus decentralized AI compute as a provider option. Morpheus exposes an OpenAI-compatible API at api.mor.org with 30+ models. Changes across 7 files: - packages/shared: Add 'morpheus' to LLM_PROVIDERS and Zod schema - apps/server: Add Morpheus factory in both provider-factory.ts and provider.ts using @ai-sdk/openai-compatible - apps/agent: Add Morpheus to ProviderType union, provider templates, dropdown options, default base URL, model list, and form validation Default model: glm-5. API key from https://app.mor.org. Most models also support :web variants for internet search. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
Thank you for your contribution! Before we can merge this PR, we need you to sign our Contributor License Agreement. To sign the CLA, please add a comment to this PR with the following text: You only need to sign once. After signing, this check will pass automatically. Troubleshooting
You can retrigger this bot by commenting **recheck** in this Pull Request. Posted by the **CLA Assistant Lite bot**. |
Contributor
Greptile SummaryThis PR adds Morpheus as a new LLM provider option, following the established pattern for OpenAI-compatible providers. The implementation is clean and consistent across all 7 modified files.
The implementation correctly mirrors the pattern used for similar providers like Ollama and LM Studio, with appropriate API key validation. Confidence Score: 5/5
Important Files Changed
Last reviewed commit: 6cc80d3 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds Morpheus decentralized AI compute as a provider option in BrowserOS. Morpheus exposes an OpenAI-compatible API at
api.mor.orgwith 30+ models including GLM-5, Kimi K2.5, Hermes 3 Llama 3.1 405B, Qwen3-235B, DeepSeek R1, and Llama 4 Maverick.Changes (7 files, +48 lines)
packages/shared/src/schemas/llm.ts— AddedMORPHEUS: 'morpheus'toLLM_PROVIDERSconstant andLLMProviderSchemaZod enumapps/server/src/agent/tool-loop/provider-factory.ts— AddedcreateMorpheusFactoryusing@ai-sdk/openai-compatibleapps/server/src/lib/clients/llm/provider.ts— AddedcreateMorpheusModelusing@ai-sdk/openai-compatibleapps/agent/lib/llm-providers/types.ts— Added'morpheus'toProviderTypeunionapps/agent/lib/llm-providers/providerTemplates.ts— Added Morpheus template, dropdown option, and default base URL (https://api.mor.org/api/v1)apps/agent/entrypoints/app/ai-settings/models.ts— Added Morpheus model list toModelsDataandMODELS_DATAapps/agent/entrypoints/app/ai-settings/NewProviderDialog.tsx— Added'morpheus'to Zod validation enumMorpheus Details
https://api.mor.org/api/v1/chat/completions)glm-5:webvariants (e.g.,glm-5:web) for internet-enabled searchImplementation Pattern
Follows the same pattern as existing providers (Ollama, LM Studio) that use
@ai-sdk/openai-compatible. The default base URL ishttps://api.mor.org/api/v1, with API key required.Test plan
🤖 Generated with Claude Code