mirror of
https://github.com/jasonxu114514/opencode2api.git
synced 2026-12-05 16:04:01 +00:00
- Remove the new/New prefix from constructors; rename the colliding types semantically (ModelCatalog, RuntimeController, Metrics, LogBroker, Redactor, proxyTransports, upstreamNodes, ...). - Unify upstream lane naming on v1 (/zen, OpenCode 1.x shape) and v2 (/inference and /zen/go, 2.x CLI shape); add models.IsV1Upstream and drop the duplicated lane detection. - Fix inaccurate, truncated and stale comments across all packages and document exported symbols plus non-obvious internals. - Fix anthropicThinking passing "enabled"/"adaptive" through as an effort; derive the level from the budget instead. - Delete dead code (identity.StableID, unused protocol decoders and stream parser wrappers). - Export EffectiveListeners, rename modelsDev* metadata constants, and describe the metadata source as the OpenCode endpoint. - Rename the forced-collapse log event to stream_collapse_failed and add an anonymous field. - Correct the README upstream.zen default and add upstream.anonymous.
16 lines
570 B
Go
16 lines
570 B
Go
package config
|
|
|
|
// Tier names a keyed upstream tier. It is also the type of the "prefer"
|
|
// setting, which picks the tier that is tried first when both serve a model.
|
|
type Tier string
|
|
|
|
const (
|
|
// TierZen is the keyed Zen tier, served by upstream.zen, whose default is
|
|
// the v1 /zen origin. Anonymous routes resolve to TierZen too, although
|
|
// the keyless lane sends to its own origins (see UpstreamConfig.Anonymous).
|
|
TierZen Tier = "zen"
|
|
// TierGo is the keyed Go plan tier, served by upstream.go, whose default
|
|
// is the v2 /zen/go origin.
|
|
TierGo Tier = "go"
|
|
)
|