Skip to content

feat(provider): add Ambient as a built-in verified-inference provider#3389

Open
ambient-gregory wants to merge 1 commit into
tailcallhq:mainfrom
ambient-gregory:feat/ambient-provider
Open

feat(provider): add Ambient as a built-in verified-inference provider#3389
ambient-gregory wants to merge 1 commit into
tailcallhq:mainfrom
ambient-gregory:feat/ambient-provider

Conversation

@ambient-gregory
Copy link
Copy Markdown

@ambient-gregory ambient-gregory commented May 25, 2026

Summary

Add Ambient as a built-in LLM provider in ForgeCode, exposing Ambient-hosted models through its OpenAI-compatible chat completions API.

Context

Ambient is a verified inference provider — every request is independently verified and the proof is posted on-chain, giving users cryptographic guarantees that the output came from the advertised model and weights. Verification is transparent to the client: no special headers or request fields are required.

The API itself is OpenAI-compatible (https://api.ambient.xyz/v1/chat/completions and https://api.ambient.xyz/v1/models), so this integration plugs into the existing OpenAI response type with no new transport code.

Changes

crates/forge_repo/src/provider/provider.json

  • Added ambient provider entry with OpenAI-compatible response type
  • Chat endpoint: https://api.ambient.xyz/v1/chat/completions
  • Models endpoint: https://api.ambient.xyz/v1/models (driven live from the API, so the catalog stays in sync without code changes)
  • Auth: API key (AMBIENT_API_KEY)

crates/forge_domain/src/provider.rs

  • Added ProviderId::AMBIENT constant
  • Registered in built_in_providers()
  • Added "Ambient" display-name mapping
  • Added "ambient" arm to FromStr
  • Added 3 unit tests: test_ambient_from_str, test_ambient_display_name, test_ambient_in_built_in_providers
  • Extended test_provider_id_display_name and test_codex_in_built_in_providers aggregate tests

crates/forge_repo/src/provider/provider_repo.rs

  • Added test_ambient_config covering id, env var, response type, and URL

How to Use

  1. Get an API key from Ambient
  2. forge provider login ambient → enter your key
  3. Select an Ambient model via /model

Testing

cargo test -p forge_domain -p forge_repo provider

All 269 existing provider tests pass; 4 new Ambient tests added and passing.

Register Ambient as a built-in OpenAI-compatible provider. Models are
sourced live from Ambient's /v1/models endpoint, so the catalog stays in
sync with the upstream API without code changes.

- provider.json: ambient entry (AMBIENT_API_KEY, OpenAI response type)
- ProviderId::AMBIENT constant, display name, built-in registration,
  FromStr arm
- Tests: from_str, display_name, built_in_providers, provider_repo config
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 25, 2026

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions Bot added type: feature Brand new functionality, features, pages, workflows, endpoints, etc. type: provider Updates provider.json configuration. labels May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature Brand new functionality, features, pages, workflows, endpoints, etc. type: provider Updates provider.json configuration.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants