mirror of
https://github.com/docker/docker-agent.git
synced 2026-11-04 18:30:09 +00:00
Blockers:
- Restore .gitignore that was accidentally wiped to 3 stray lines
- Fix Google base_url in opencode-zen docs: /zen (not /v1) because the
genai SDK appends its own v1beta path segment
models.go live-fetch:
- Scope live-fetch to opencode-zen/opencode-go only (liveFetchProviders
allow-list) so --provider ollama no longer issues a GET to localhost
- Normalize providerFilter to lowercase so case-sensitive map lookups
(AvailableProviders, db.Providers, IsCatalogProvider) match the same
way strings.EqualFold does in the outer row filter
- Drop dead db != nil guard (db.Providers already ranged unconditionally
above)
- fetchProviderModels now:
* uses httpclient.NewHTTPClient so requests carry the Cagent User-Agent
and OTel tracing like every other outbound call
* sends Bearer auth from the alias's TokenEnvVar so an authenticated
user does not silently get an empty list from providers that require
the key on /v1/models
* uses a 5s context timeout (matching DMR/models-gateway discovery)
instead of 30s
- Split out dispatchModelsRequest so fetchModelsFromURL stays a thin
test wrapper; dedup is preserved at the collectModels caller via seen[ref]
Other:
- Add comment to cloudProviders explaining the Zen-first ordering for
the shared OPENCODE_API_KEY env var
- Update stale doc comment on autoSelectsResponsesAPI to include
opencode-zen in the enumeration
- Fix kimi-k2.7 -> kimi-k2.7-code in practical example (matches live
gateway and docs table)
- Swap nav.yml ordering: Zen before Go for consistency with overview
table and auto-selection precedence
- Remove trailing whitespace in opencode-go docs (line 157)
27 lines
1011 B
YAML
27 lines
1011 B
YAML
# OpenCode Go — Practical Example
|
|
#
|
|
# Requirements:
|
|
# 1. Subscribe to OpenCode Go at https://opencode.ai/auth
|
|
# 2. Copy your API key and export it as an environment variable:
|
|
# export OPENCODE_API_KEY="your-api-key"
|
|
#
|
|
# Available models:
|
|
# OpenAI-compatible (/v1/chat/completions):
|
|
# deepseek-v4-flash, deepseek-v4-pro, kimi-k2.7-code, kimi-k2.6,
|
|
# glm-5.2, glm-5.1, mimo-v2.5, mimo-v2.5-pro
|
|
#
|
|
# Anthropic-compatible (/v1/messages) — requires a custom provider:
|
|
# minimax-m3, minimax-m2.7, qwen3.7-max, qwen3.7-plus, qwen3.6-plus
|
|
|
|
agents:
|
|
root:
|
|
model: opencode-go/deepseek-v4-flash
|
|
description: Go assistant for programming tasks
|
|
instruction: |
|
|
You are an expert programming assistant.
|
|
You help with code, debugging, code review, and software architecture.
|
|
commands:
|
|
code: Write clean, well-structured code for the user's request.
|
|
review: Review the provided code and suggest improvements.
|
|
debug: Help debug the described code issue.
|