Repository navigation
feat: add Cohere direct API support - #919
Merged
Merged
Conversation
57 tasks done
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
cohereprovider through Cohere's native V2 Chat API, including Bearer authentication, account-scoped paginated model discovery, exact model IDs, native reasoning control, and deterministic two-stage tool replay.Why
Issue #860 includes Cohere direct API support in the Phase 3 provider matrix. Cohere's native Chat and model-discovery contracts differ from OpenAI-compatible APIs, so this slice adds the smallest provider-specific adapter and discovery seam needed to preserve the official wire contract and stable persisted identity.
Refs #860
Scope
This PR only adds Cohere direct API support under persisted provider ID
cohere. It does not add Bedrock or Vertex Cohere, OpenAI-compatible proxies, other providers, or Phase 7 work.Verification
npm run rebuild— passed, including the production renderer build and third-party notice check.npm run typecheck— passed for every workspace./v1/modelspagination and the V2 two-stage tool loop.npm run check:stale,git diff --check, renderer notice verification, and byte comparison against the immutable upstream Cohere SVG — passed.e2echeck.Impact
Users can configure Cohere directly with a Cohere API key, discover the models available to their account, and use exact native model IDs for chat, reasoning, and tools. Existing provider identities, connections, and storage formats are unchanged; no migration is required.
Reviewer notes
The provider registry remains the single owner of identity and ordering. DeepInfra's official discovery seam remains unchanged at order 29; Cohere is appended at order 30. The vendored SVG provenance is
lobehub/lobe-icons,@lobehub/icons-static-svg@1.91.0, commite4302041fbb3039608d25f9f618bd462783b875e, pathpackages/static-svg/icons/cohere.svg, MIT, SHA-25672851dd36d6ab017f535202744765eead8f99cfb5ced77e1840bfdb70db7a85c.Ready for review
Verificationexplains why it is not applicable