Skip to content

feat:Add enterprise foundry support parameters#16368

Open
ak4153 wants to merge 2 commits intoanomalyco:devfrom
ak4153:add-antrophic-foundry
Open

feat:Add enterprise foundry support parameters#16368
ak4153 wants to merge 2 commits intoanomalyco:devfrom
ak4153:add-antrophic-foundry

Conversation

@ak4153
Copy link

@ak4153 ak4153 commented Mar 6, 2026

Issue for this PR

Closes #

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

This adds support for extra runtime provider options on type: "api" auth entries in ~/.local/share/opencode/auth.json.

Before this change, API auth only accepted a key. That made it hard to use providers behind enterprise gateways or proxies that also need per-user connection settings such as baseURL, custom headers, timeout overrides, or mTLS client certificate paths.

With this PR, those values can be stored under auth.json in an options object and are merged into the provider runtime options before the SDK client is created. TLS file paths are loaded and forwarded into the fetch layer so mTLS-backed endpoints work without requiring global certificate environment setup.

I also updated the docs to show the intended split:

  • opencode.json defines a custom provider ID and model list
  • auth.json stores credentials and per-user connection overrides

This was motivated by Azure Foundry / enterprise proxy use cases, but the implementation is generic and applies to any API-backed provider.

How did you verify your code works?

I ran:

  • cd packages/opencode && bun test --timeout 30000 test/auth/auth.test.ts test/provider/provider.test.ts
  • cd packages/opencode && bun run typecheck
  • cd packages/app && bun run typecheck

The added tests cover auth round-trip for API auth with options, runtime merge of auth-side options, and TLS material loading into fetch.

Screenshots / recordings

No UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions bot added needs:compliance This means the issue will auto-close after 2 hours. needs:title labels Mar 6, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

Hey! Your PR title Add antrophic foundry doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@ak4153 ak4153 changed the title Add antrophic foundry feat:Add enterprice foundry support parameters Mar 6, 2026
@ak4153 ak4153 changed the title feat:Add enterprice foundry support parameters feat:Add enterprise foundry support parameters Mar 6, 2026
@github-actions github-actions bot removed needs:compliance This means the issue will auto-close after 2 hours. needs:title labels Mar 6, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

Thanks for updating your PR! It now meets our contributing guidelines. 👍

1 similar comment
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@ak4153 ak4153 force-pushed the add-antrophic-foundry branch from 23b6ee7 to da63b58 Compare March 6, 2026 16:37
@ak4153 ak4153 requested a review from adamdotdevin as a code owner March 6, 2026 16:37
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