feat: add Astraflow provider support#3017
Open
ucloudnb666 wants to merge 1 commit into
Open
Conversation
Signed-off-by: ucloudnb666 <ucloudnb666@users.noreply.github.com>
|
@ucloudnb666 is attempting to deploy a commit to the IndexLabs Team on Vercel. A member of the Team first needs to authorize it. |
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.
What does this PR do?
Adds Astraflow (by UCloud / 优刻得) as a new agent provider — an OpenAI-compatible AI model aggregation platform supporting 200+ models.
Since Astraflow exposes an OpenAI-compatible API, this integration reuses the existing
opencodeCLI backend and injects the appropriateOPENAI_BASE_URL+OPENAI_API_KEYenv vars at task-execution time. No new SDK or subprocess is required.Two variants are supported:
astraflowhttps://api-us-ca.umodelverse.ai/v1ASTRAFLOW_API_KEYastraflow-cnhttps://api.modelverse.cn/v1ASTRAFLOW_CN_API_KEYRelated Issue
Closes #
Type of Change
Changes Made
.env.example— DocumentsASTRAFLOW_API_KEYandASTRAFLOW_CN_API_KEYserver/internal/daemon/config.go— Probesopencodebinary when an Astraflow API key env var is set; registersastraflow/astraflow-cnagent entriesserver/pkg/agent/agent.go— Addsastraflowandastraflow-cncases to theNew()factory; each injectsOPENAI_BASE_URL+OPENAI_API_KEYinto theopencodeBackendconfig; updateslaunchHeadersserver/pkg/agent/models.go— Addsastraflow/astraflow-cncases toListModels(), delegating todiscoverOpenCodeModelspackages/views/runtimes/components/provider-logo.tsx— AddsAstraflowLogoSVG (UCloud blue#0052D9) and theastraflow/astraflow-cnswitch casesHow to Test
astraflow(and/orastraflow-cn) appears as an auto-detected runtime alongside other configured providers, and that model listing and task execution work correctly against the Astraflow endpoint.Checklist
apps/web/features/landing/i18n/) and relevant docs (apps/docs/content/docs/)apps/docs/content/docs/developers/conventions.zh.mdx(terminology, mixed-rule fortask/issue/skill)AI Disclosure
AI tool used:
Prompt / approach:
Screenshots (optional)
N/A