Skip to content

Commit 94527d5

Browse files
authored
docs: make flux documentation match the code (#126)
* docs(runtime): describe runtime as engine-internal The runtime package comment called runtime the recommended host entry point, listed provider/catalog/config/credentials/setup/storage as the packages hosts import, and claimed the registry holds 16 providers. The host contract is engine/llm/graph/tools, rho imports none of those packages directly, and catalog/registry defines 28 providers. Rewrite the comment to say runtime is engine-internal and not covered by engine.ContractVersion, and point at the registry instead of restating its size (F294). * docs: derive provider count, table and env example from the registry AGENTS.md claimed "75+ LLM providers" while catalog/registry defines 28. The README table said it was in registry SortOrder but was not, and listed STEPFUN_API_KEY although StepFun reads STEP_API_KEY. .env.example carried the same wrong StepFun variable plus FLUX_API_KEY, KIMI_API_KEY and MINIMAX_API_KEY, which nothing in flux reads. - AGENTS.md: state the 28 provider gateways in catalog/registry. - README: reorder the table to real SortOrder, fix StepFun, add the Z.AI and StepFun region options. - .env.example: list exactly the registry CredentialEnv variables. - catalog/registry/docs_test.go: fail when any provider count stated in README, AGENTS.md, docs or runtime.go, the README table (IDs, order, credential variables, fallbacks, regions) or the .env.example block drift from registry.All() (F041, F294). * fix(scripts): derive config-flow provider counts from the registry test-config-flow.sh counted providers with `cd .. && grep flux/catalog/...`, so any checkout not named "flux" reported 0 providers and failed, and it printed "all 11 providers have live fetchers" while the registry holds 28. `grep -c ... || echo 0` also produced "0\n0" on no match. cd to the repo root once, compare the live-fetcher count to the registry count instead of a hardcoded 11, and report the real numbers (F294). * docs(grpc): describe the opt-in gRPC transport as it is README called the gRPC surface a "dependency-free skeleton ... wired when generated stubs are available" and the grpc.go package comment said flux "does not currently import google.golang.org/grpc". In fact go.mod requires google.golang.org/grpc directly (so it lands in consumers' go.sum), server_grpc.go (tag grpc) serves flux.v1.ChatService/Chat with a JSON codec and no protobuf stubs, and EngineChatService already adapts conversation.Engine. The unit test comment also claimed the tagged test covers the engine-backed round trip, but it uses a stub service. - README: rewrite the section and the Quick Start dependency list. - grpc.go / internal/grpc/README.md: state the real status (tagged JSON transport, direct go.mod requirement, internal package, no caller starts it) and drop the stale "until stubs are added" comments. - grpc_engine_test.go: exercise EngineChatService over a store-backed conversation.Engine without the build tag: aggregated deltas, saved node ID, request fields forwarded, stream error surfaced, nil request rejected (F042). * docs(engine): document and guard the frozen engine-internal symbols README and AGENTS.md said hosts depend only on engine/llm/graph/tools and that credentials, provider and the rest are not shared contracts. But the facade exposes engine-internal symbols: engine.MapStore, DefaultStore and SetDefaultStore re-export credentials, Options. SecretStore is a credentials.Store, OperationsGraphInput/Export alias operationsgraph, and Options.RateLimitConfig/CacheConfig carry provider/resilience and provider/cache structs (plus HeaderExtractor and RateLimitHeaders transitively). Rho's import-path checks cannot see through these aliases. Narrowing the exports is not possible without breaking rho: its production code uses engine.MapStore, DefaultStore, SetDefaultStore, OperationsGraphInput and BuildOperationsGraph. So document the set as frozen contract-v2 symbols instead: - HOST-ENGINE-BOUNDARY.md: new "Frozen engine-internal types" table. - README, AGENTS.md, engine/doc.go: point at it; replace the nonexistent `client` package with `provider`. - engine/host_surface_test.go: walk the exported surface of the four contract packages with go/ast, follow engine-internal symbols through struct fields, signatures and exported methods, and fail when the reachable set differs from the frozen list or the doc omits one (F043). * docs(architecture): drop the nonexistent flux serve binary docs/ARCHITECTURE.md advertised a Port 8080 badge, "Override: flux serve <port>" and "Set via FLUX_API_KEY". flux is a library with no cmd/ and no serve command, nothing reads FLUX_API_KEY, and internal/api's server takes its key from api.Config.APIKey and its address from ListenAndServe(addr); nothing in flux starts it. Other claims in the same doc were also false: the provider-detection table (openai is 19th, not 2nd, and detection reads the credential store, not env vars), "blocking responses wrap the stream" (FluxClient. Chat calls the provider's blocking Chat), sr.Events() (a field, not a method), Retry-After "on 429 only", and the caching table (the exact cache is provider/cache, the similarity cache is provider/embeddings). docs/README.md listed docs/api/openapi.yaml (it is at the repo root), three guides that do not exist, a Discussions link although Discussions are disabled, and claimed the OpenAPI spec covers /v1/chat/completions, /rerank and /ready, which it does not. Rewrite those sections to match the code and note the OpenAPI gap (F273). * docs(agents): point AGENTS.md and the README tree at real files AGENTS.md cited provider/stream.go, provider/resilience/fallback.go, provider/errors.go and errors/errors.go (none exist), told contributors to add providers as provider/<name>.go registered in provider_registry.go, named provider.NewFluxClient and parseSSEStream (neither exists), said DetectProvider checks env vars in ANTHROPIC/OPENAI order, pointed "semantic caching" at the exact-match cache, and described a parent graycode-eco/go.work that does not exist. The README architecture tree listed errors/, catalog/legacy/ and internal/version/ (none exist) and omitted the llm, graph and tools contract packages. - AGENTS.md: real paths and symbols, the actual add-a-provider flow (registry spec, config profile, setup deployment case, live fetcher, adapter only when not OpenAI-compatible), the real linter set, and the no-go.work/no-replace rule. - README: rebuild the architecture tree from the current layout. - docs_paths_test.go: fail when a path cited in AGENTS.md or an entry in the README.md / docs/README.md trees does not exist (F272). * docs: correct five stale file paths in AGENTS.md docs_paths_test.go asserts that every path-like token in AGENTS.md resolves to a real file. Merging main's prose during the rebase reinstated citations that had been fixed on this branch: - provider/stream.go -> provider/core/stream.go - provider/resilience/fallback.go -> router/router.go, router/deployment_router.go - provider/errors.go -> provider/core/errors.go - errors/errors.go -> types/errors.go - provider/adapters/AnthropicClient -> provider/adapters/anthropic.go ---------
1 parent 80371d9 commit 94527d5

15 files changed

Lines changed: 1089 additions & 181 deletions

File tree

‎.env.example‎

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
# flux environment variables — copy to .env and fill in
22

3-
# Provider API keys (or store them in the OS keychain — see
4-
# docs/guides/CREDENTIAL-SETUP-FLOW.md)
5-
FLUX_API_KEY=
6-
OPENAI_API_KEY=
3+
# Provider credentials, one per registry entry in catalog/registry/providers.go
4+
# (registry SortOrder). Or store them in the OS keychain — see
5+
# docs/guides/CREDENTIAL-SETUP-FLOW.md. catalog/registry/docs_test.go keeps this
6+
# block in sync with the registry.
7+
AGNES_API_KEY=
8+
AWS_SECRET_ACCESS_KEY=
79
ANTHROPIC_API_KEY=
8-
GEMINI_API_KEY=
10+
AZURE_OPENAI_API_KEY=
11+
CANOPYWAVE_API_KEY=
12+
CLINE_API_KEY=
13+
CONCENTRATE_API_KEY=
914
DEEPSEEK_API_KEY=
15+
GEMINI_API_KEY=
1016
GROQ_API_KEY=
11-
KIMI_API_KEY=
1217
MOONSHOT_API_KEY=
13-
ZAI_API_KEY=
14-
ZAI_CODING_API_KEY=
15-
XIAOMI_MIMO_PAYG_API_KEY=
16-
XIAOMI_MIMO_TOKEN_PLAN_API_KEY=
17-
MINIMAX_API_KEY=
18+
LONGCAT_API_KEY=
19+
MINIMAX_PAYG_API_KEY=
1820
MINIMAX_TOKEN_PLAN_API_KEY=
19-
AZURE_OPENAI_API_KEY=
20-
AWS_SECRET_ACCESS_KEY=
21-
VERTEX_ACCESS_TOKEN=
21+
OPENAI_API_KEY=
22+
OPENCODEGO_API_KEY=
2223
OPENROUTER_API_KEY=
23-
CONCENTRATE_API_KEY=
24-
OPENGATEWAY_API_KEY=
25-
STEPFUN_API_KEY=
26-
AGNES_API_KEY=
27-
LONGCAT_API_KEY=
28-
FIREWORKS_API_KEY=
29-
CANOPYWAVE_API_KEY=
24+
OLLAMA_BASE_URL=
3025
POOLSIDE_API_KEY=
31-
CLINE_API_KEY=
32-
OPENCODEGO_API_KEY=
26+
VERTEX_ACCESS_TOKEN=
3327
XAI_API_KEY=
34-
OLLAMA_BASE_URL=
28+
XIAOMI_MIMO_PAYG_API_KEY=
29+
XIAOMI_MIMO_TOKEN_PLAN_API_KEY=
30+
ZAI_CODING_API_KEY=
31+
ZAI_API_KEY=
32+
STEP_API_KEY=
33+
OPENGATEWAY_API_KEY=
34+
FIREWORKS_API_KEY=
3535

3636
# Default model overrides
3737
OPENAI_MODEL=gpt-4o

‎AGENTS.md‎

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ When starting any new work (feature, fix, refactor, chore), always create a feat
88

99
## Design Principles
1010

11-
- **Model-agnostic** — single interface for 75+ LLM providers
11+
- **Model-agnostic** — single interface for the 28 provider gateways in
12+
`catalog/registry/providers.go` (see README "Supported Providers")
1213
- **Host-neutral engine** — Flux owns provider routing, transport, caching,
1314
retry/fallback, and normalized telemetry; hosts own product UX and semantics
1415
- **Streaming-first** — all responses are streamed; blocking is opt-in
@@ -55,6 +56,12 @@ make ci # Full CI suite
5556
`StreamResult`, `ResponseFormat`, `ImageURLPart`, `InputAudioPart`) live in
5657
`llm` with no `engine` alias; widening the facade to cover them is a
5758
deliberate API change, not an incidental one.
59+
- The facade already exposes a frozen set of engine-internal symbols
60+
(`credentials.Store`/`MapStore`, `operationsgraph.Input`/`Export`, the
61+
`provider/resilience` rate-limit config and `provider/cache.CacheConfig`),
62+
listed in `docs/architecture/HOST-ENGINE-BOUNDARY.md`. Changing them breaks
63+
hosts. `engine/host_surface_test.go` fails whenever that reachable set
64+
changes; update its list and the doc together, deliberately.
5865
- `provider/core.Provider` is the lower-level provider contract; keep its
5966
method set stable and use it across feature packages
6067
- Streaming tests need careful goroutine management
@@ -77,7 +84,7 @@ make ci # Full CI suite
7784
- **Provider interface**: `provider/core.Provider` with `Chat()`, `StreamChat()`, `Ping()`, `Name()`
7885
- **Core request types**: `provider/core.FluxMessage`, `FluxResponse`, `FluxTool`, `FluxUsage`
7986
- **Config struct**: `provider/core.FluxConfig` with `Provider`, `APIKey`, `BaseURL`, `Model`, `MaxRetries`
80-
- **Provider implementations**: `provider/adapters/AnthropicClient`, `OpenAIClient`, `GeminiClient`, etc.
87+
- **Provider implementations**: `provider/adapters/anthropic.go` (`AnthropicClient`), `openai.go` (`OpenAIClient`), `gemini.go` (`GeminiClient`), etc.
8188
- **Compatibility configs**: `provider/adapters.OpenAICompat`, `GrokCompat`, `OpenRouterCompat`
8289
- **Error type**: `FluxError` with `Provider`, `Op`, `StatusCode`, `RequestID`, `Message`, `Err` fields
8390
- **Stream types**: `StreamResult`, `SSEEvent`, `StreamEvent` — streaming is SSE-based
@@ -140,14 +147,14 @@ make ci # Full CI suite
140147
| Azure provider | `provider/adapters/azure.go` |
141148
| Provider registry | `provider/adapters/provider_registry.go` |
142149
| Provider compatibility | `provider/adapters/compat.go` (`OpenAICompat`, `GrokCompat`, etc.) |
143-
| SSE streaming | `provider/stream.go` (`parseSSEStream()`, `SSEEvent`) |
150+
| SSE streaming | `provider/core/stream.go` (`parseSSEStream()`, `SSEEvent`) |
144151
| Retry logic | `provider/core/retry.go` (`RetryConfig`, `backoffDelay()`, `shouldRetry()`) |
145152
| Rate limiting | `provider/resilience/ratelimit.go`, `provider/resilience/adaptive_ratelimit.go` |
146153
| Caching | `provider/cache/cache.go`, `provider/cache/semantic_cache.go` |
147-
| Fallback chains | `provider/resilience/fallback.go` |
154+
| Fallback chains | `router/router.go` (fallback providers), `router/deployment_router.go` (fallback deployment stages) |
148155
| Auto-continuation | `provider/resilience/continuation.go` |
149-
| Error types | `provider/errors.go` (`FluxError`, `IsRetriable()`, `IsAuthError()`) |
150-
| Error constants | `errors/errors.go` (API error messages, prompt-too-long parsing) |
156+
| Error types | `provider/core/errors.go` (`FluxError`, `IsRetriable()`, `IsAuthError()`) |
157+
| Error constants | `types/errors.go` (API error messages, prompt-too-long parsing) |
151158
| Model catalog | `catalog/` (pricing, context windows, capabilities per provider) |
152159
| Credentials | `credentials/` (key storage, env detection, scrubbing) — `HasSecret` is silent on miss (boolean predicate); `LookupSecret` logs `Debug` on `ErrNotFound` and `Warn` on real backend errors |
153160
| Mock provider | `provider/testkit/mock.go` |

‎README.md‎

Lines changed: 73 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ Everything else is engine-internal: `provider`, `catalog`, `config`,
6161
contracts. Enforced by `rho/scripts/check-flux-engine-boundary.sh`
6262
and two Go AST tests in `rho/internal/testaudit/`.
6363

64+
Exception: a fixed set of engine-internal symbols is reachable through the
65+
facade (for example `credentials.Store` behind `engine.Options.SecretStore`
66+
and `operationsgraph.Input` behind `engine.OperationsGraphInput`). Those
67+
symbols are frozen as part of the contract; see
68+
[Frozen engine-internal types](docs/architecture/HOST-ENGINE-BOUNDARY.md#frozen-engine-internal-types).
69+
`engine/host_surface_test.go` fails when that set changes.
70+
6471
- do not import `rho/internal/*`
6572
- do not import the removed legacy path `rho/shared/types`
6673

@@ -70,8 +77,9 @@ and two Go AST tests in `rho/internal/testaudit/`.
7077
go get github.com/GrayCodeAI/flux
7178
```
7279

73-
Requires Go 1.26+ and a configured provider credential. Minimal dependencies
74-
(UUID, OpenTelemetry, SQLite, keyring).
80+
Requires Go 1.26+ and a configured provider credential. Direct dependencies:
81+
UUID, tiktoken tokenizer, OS keyring, OpenTelemetry, pure-Go SQLite, and gRPC
82+
(linked only into `-tags grpc` builds of `internal/grpc`).
7583

7684
```go
7785
import (
@@ -171,9 +179,9 @@ Named `primary` / `weak` / `editor` model slots with fallback to primary, plus a
171179

172180
`POST /rerank` endpoint (provider-backed with lexical fallback) and a `GET /ready` readiness probe alongside the existing health check.
173181

174-
### gRPC Skeleton
182+
### gRPC Transport (opt-in, internal)
175183

176-
Dependency-free gRPC API skeleton behind the `grpc` build tag — wired when generated stubs are available.
184+
`internal/grpc` holds an optional gRPC transport behind the `grpc` build tag. It serves `flux.v1.ChatService/Chat` with a registered `json` content subtype (no `.proto` files or generated stubs; clients call with `grpc.CallContentSubtype("json")`), backed by `EngineChatService` over `conversation.Engine`. The package is internal, so hosts cannot import it, and nothing in flux starts it. `google.golang.org/grpc` is a direct requirement in `go.mod`, so it appears in consumers' module graphs, but only `-tags grpc` builds link it.
177185

178186
## Documentation
179187

@@ -199,40 +207,40 @@ ANTHROPIC_API_KEY=sk-... go run ./examples/basic/
199207

200208
## Supported Providers
201209

202-
28 provider gateways in `catalog/registry/providers.go` (rho `/config` uses the same list), listed in registry `SortOrder`:
210+
28 provider gateways in `catalog/registry/providers.go` (rho `/config` uses the same list), listed in registry `SortOrder`. `catalog/registry/docs_test.go` fails when this table, the count, or `.env.example` drift from the registry.
203211

204212
| Provider | ID | Env variable |
205213
|---|---|---|
214+
| **Agnes** | `agnes` | `AGNES_API_KEY` |
215+
| **Amazon Bedrock** | `bedrock` | `AWS_SECRET_ACCESS_KEY` (+ `AWS_ACCESS_KEY_ID`, `AWS_SESSION_TOKEN`) |
206216
| **Anthropic** | `anthropic` | `ANTHROPIC_API_KEY` |
207-
| **OpenAI** | `openai` | `OPENAI_API_KEY` |
208-
| **Google Gemini** | `gemini` | `GEMINI_API_KEY` |
209-
| **DeepSeek** | `deepseek` | `DEEPSEEK_API_KEY` |
210-
| **xAI (Grok)** | `grok` | `XAI_API_KEY` |
211-
| **Kimi (Moonshot)** | `kimi` | `MOONSHOT_API_KEY` |
212-
| **Z.AI — Coding Plan** | `zai_coding` | `ZAI_CODING_API_KEY` |
213-
| **Z.AI — Pay-as-you-go** | `zai_payg` | `ZAI_API_KEY` |
214-
| **Xiaomi (MiMo) Token Plan** | `xiaomi_mimo_token_plan` | `XIAOMI_MIMO_TOKEN_PLAN_API_KEY` (+ region `cn` / `sgp` / `ams`) |
215-
| **Xiaomi (MiMo) Pay-as-you-go** | `xiaomi_mimo_payg` | `XIAOMI_MIMO_PAYG_API_KEY` |
216-
| **MiniMax — Token Plan** | `minimax_token_plan` | `MINIMAX_TOKEN_PLAN_API_KEY` |
217-
| **MiniMax — Pay-as-you-go** | `minimax_payg` | `MINIMAX_PAYG_API_KEY` |
218217
| **Azure OpenAI** | `azure` | `AZURE_OPENAI_API_KEY` (+ `AZURE_OPENAI_ENDPOINT`) |
219-
| **Amazon Bedrock** | `bedrock` | `AWS_SECRET_ACCESS_KEY` (+ `AWS_ACCESS_KEY_ID`, `AWS_SESSION_TOKEN`) |
220-
| **Vertex AI** | `vertex` | `VERTEX_ACCESS_TOKEN` (or `GOOGLE_OAUTH_ACCESS_TOKEN`) |
221-
| **OpenRouter** | `openrouter` | `OPENROUTER_API_KEY` |
222218
| **CanopyWave** | `canopywave` | `CANOPYWAVE_API_KEY` |
223-
| **Poolside** | `poolside` | `POOLSIDE_API_KEY` |
224-
| **Groq** | `groq` | `GROQ_API_KEY` |
225219
| **ClinePass** | `clinepass` | `CLINE_API_KEY` |
226220
| **Concentrate** | `concentrate` | `CONCENTRATE_API_KEY` |
227-
| **OpenGateway** | `opengateway` | `OPENGATEWAY_API_KEY` |
228-
| **StepFun** | `stepfun` | `STEPFUN_API_KEY` |
229-
| **Agnes** | `agnes` | `AGNES_API_KEY` |
221+
| **DeepSeek** | `deepseek` | `DEEPSEEK_API_KEY` |
222+
| **Google Gemini** | `gemini` | `GEMINI_API_KEY` |
223+
| **Groq** | `groq` | `GROQ_API_KEY` |
224+
| **Kimi (Moonshot)** | `kimi` | `MOONSHOT_API_KEY` |
230225
| **LongCat** | `longcat` | `LONGCAT_API_KEY` |
231-
| **Fireworks AI** | `fireworks` | `FIREWORKS_API_KEY` |
226+
| **MiniMax — Pay-as-you-go** | `minimax_payg` | `MINIMAX_PAYG_API_KEY` |
227+
| **MiniMax — Token Plan** | `minimax_token_plan` | `MINIMAX_TOKEN_PLAN_API_KEY` |
228+
| **OpenAI** | `openai` | `OPENAI_API_KEY` |
232229
| **OpenCode Go** | `opencodego` | `OPENCODEGO_API_KEY` |
230+
| **OpenRouter** | `openrouter` | `OPENROUTER_API_KEY` |
233231
| **Ollama** | `ollama` | `OLLAMA_BASE_URL` (local; no API key) |
232+
| **Poolside** | `poolside` | `POOLSIDE_API_KEY` |
233+
| **Vertex AI** | `vertex` | `VERTEX_ACCESS_TOKEN` (or `GOOGLE_OAUTH_ACCESS_TOKEN`) |
234+
| **xAI (Grok)** | `grok` | `XAI_API_KEY` |
235+
| **Xiaomi (MiMo) Pay-as-you-go** | `xiaomi_mimo_payg` | `XIAOMI_MIMO_PAYG_API_KEY` |
236+
| **Xiaomi (MiMo) Token Plan** | `xiaomi_mimo_token_plan` | `XIAOMI_MIMO_TOKEN_PLAN_API_KEY` (+ region `cn` / `sgp` / `ams`) |
237+
| **Z.AI — Coding Plan** | `zai_coding` | `ZAI_CODING_API_KEY` (+ region `international` / `cn`) |
238+
| **Z.AI — Pay-as-you-go** | `zai_payg` | `ZAI_API_KEY` (+ region `international` / `cn`) |
239+
| **StepFun** | `stepfun` | `STEP_API_KEY` (+ region `global` / `cn`) |
240+
| **OpenGateway** | `opengateway` | `OPENGATEWAY_API_KEY` |
241+
| **Fireworks AI** | `fireworks` | `FIREWORKS_API_KEY` |
234242

235-
Runtime auto-detection uses a separate priority order for chat when no deployment is pinned; see `config` profiles.
243+
Runtime auto-detection uses a separate priority order (`config.APIProviderDetectionOrder`) when no deployment is pinned.
236244

237245
## Usage
238246

@@ -289,38 +297,54 @@ config.SaveProviderConfig(cfg, "") // save changes
289297

290298
```
291299
flux/
292-
├── engine/ # Stable host-facing facade and provider-neutral DTOs
293-
├── provider/ # Provider runtime and feature packages
300+
├── engine/ # Stable host-facing facade (hosts import engine, llm, graph, tools)
301+
├── llm/ # Host-facing DTOs and the Provider port that engine re-exports
302+
├── graph/ # Portable execution-graph vocabulary
303+
├── tools/ # Tool-call and tool-result contracts
304+
├── provider/ # Provider runtime composition root (FluxClient)
294305
│ ├── core/ # Provider-neutral wire, stream, retry, and transport primitives
295306
│ ├── adapters/ # Provider protocol adapters and construction registry
296-
│ └── embeddings/ # Embedding clients, cache, and defaults
297-
├── config/ # Provider configuration & routing
298-
│ └── credential/ # Credential file management
307+
│ ├── resilience/ # Rate limits, continuation, guardrails, and error policy
308+
│ ├── cache/ # Response and semantic caches
309+
│ ├── batch/ # Batch execution
310+
│ ├── embeddings/ # Embedding clients, cache, and defaults
311+
│ ├── media/ # Image and audio clients, structured prompts
312+
│ ├── extraction/ # Structured extraction
313+
│ ├── observability/ # Usage, cost, metrics, tracing, and recording
314+
│ └── testkit/ # Mock provider for tests
299315
├── catalog/ # Model catalog & tier system
316+
│ ├── registry/ # Provider registry (single source of truth for providers)
300317
│ ├── discover/ # Model discovery
301-
│ ├── legacy/ # Legacy model support
302-
│ ├── live/ # Live model data
303-
│ └── registry/ # Model registry
304-
├── codeagent/ # Code agent retry & fallback strategies
305-
├── conversation/ # Conversation engine with branching
306-
├── credentials/ # Credential management
307-
├── docs/ # Documentation & guides
308-
├── examples/ # Runnable code examples
309-
├── router/ # Provider routing strategies
318+
│ ├── live/ # Live model listing per provider
319+
│ ├── capabilities/ # Capability and deprecation data
320+
│ └── concentrate/ opencodego/ opengateway/ xiaomi/ zai/ # Gateway-specific helpers
321+
├── config/ # Provider configuration & routing
322+
│ └── credential/ # Credential file management
323+
├── credentials/ # Keyring/env credential stores and OIDC keyless auth
324+
├── router/ # Routing strategies, deployment router, circuit breakers
325+
│ └── controlplane/ # Versioned, signed peer manifests and replicas
326+
├── runtime/ # Engine-internal provider/model/credential resolution
327+
├── setup/ # Catalog-backed deployment wiring
310328
├── operationsgraph/ # Privacy-safe route and generation telemetry projection
311-
├── runtime/ # Runtime manifest & routing policies
312-
├── storage/ # SQLite conversation DAG store
313-
├── types/ # Branded types & API errors
314-
├── errors/ # Error message constants
329+
├── conversation/ # Conversation engine with branching
330+
├── storage/ # SQLite conversation DAG store, virtual keys, budgets
331+
├── codeagent/ # Code agent retry & fallback strategies
332+
├── verify/ # Provider conformance harness
333+
├── types/ # Shared message types & API errors
315334
├── constants/ # API limits
316335
├── utils/ # Error utilities
336+
├── api/ # OpenAPI spec for internal/api
317337
├── internal/
318-
│ ├── api/ # HTTP API handlers
319-
│ ├── cache/ # Response cache warmer
338+
│ ├── api/ # HTTP API server (library code; no flux binary starts it)
339+
│ ├── cache/ # Cache backends and response cache warmer
340+
│ ├── grpc/ # Optional gRPC transport (build tag grpc)
320341
│ ├── health/ # Provider health checker
321-
│ ├── observability/ # OpenTelemetry spans & metrics
322-
│ ├── sdk/ # Go, Python, TypeScript client SDKs
323-
│ └── version/ # Version information
342+
│ ├── httputil/ probehttp/ shrink/ # HTTP, probe, and tool-description helpers
343+
│ ├── observability/ # OpenTelemetry spans, metrics, and audit sinks
344+
│ └── sdk/ # Go, Python, TypeScript clients for the internal/api HTTP surface
345+
├── docs/ # Documentation & guides
346+
├── examples/ # Runnable code examples
347+
├── scripts/ # CI guards and helper scripts
324348
└── assets/ # Logo and branding
325349
```
326350

0 commit comments

Comments
 (0)