Skip to content

feat: add Cohere direct API support - #919

Merged
Astro-Han merged 2 commits into
mainfrom
feat/cohere-provider-support
Jul 13, 2026
Merged

Astro-Han merged 2 commits into
mainfrom
feat/cohere-provider-support

Conversation

@Astro-Han

Copy link
Copy Markdown
Contributor

Summary

  • Add the stable cohere provider 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.
  • Carry the provider through the shared registry, Runtime, Headless, CLI, Storage, and Desktop seams without introducing an OpenAI-compatible proxy path.
  • Vendor Cohere's byte-identical official Lobe Icons mark through the existing provider asset-mask and third-party notice governance.

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.
  • Core provider/catalog/thinking contracts — passed.
  • Runtime provider conformance and thinking contracts — 54/54 passed, including native /v1/models pagination and the V2 two-stage tool loop.
  • Storage connection contract — 35/35 passed.
  • Headless provider environment and Harbor host contracts — 101/101 passed.
  • CLI connection target contracts — 27/27 passed.
  • Desktop icon governance — 22/22 passed.
  • models.dev snapshot sync contracts — 17/17 passed.
  • npm run check:stale, git diff --check, renderer notice verification, and byte comparison against the immutable upstream Cohere SVG — passed.
  • Named reviewer final audit on the rebased SHA — 0 P0–P3 findings.
  • A real provider smoke was not run because no safe Cohere credential was available. Local Desktop E2E is intentionally deferred to the required CI e2e check.
  • No screenshot is included because this adds no new layout or interaction design: the provider uses the existing catalog/detail UI and shared computed-style asset-mask contract. The deterministic Desktop E2E covers both surfaces in CI.

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, commit e4302041fbb3039608d25f9f618bd462783b875e, path packages/static-svg/icons/cohere.svg, MIT, SHA-256 72851dd36d6ab017f535202744765eead8f99cfb5ced77e1840bfdb70db7a85c.

Ready for review

  • Verification is complete and the results above are current
  • Impact, compatibility, migration, documentation, and release-note needs are addressed
  • User-visible UI/UX changes include visual evidence, or Verification explains why it is not applicable

@Astro-Han
Astro-Han merged commit 8b1108e into main Jul 13, 2026
3 checks passed
@Astro-Han
Astro-Han deleted the feat/cohere-provider-support branch July 13, 2026 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant