- DetectModelPlatform: document why ollama_cloud intentionally has no branch
(model-name-only input, resold families collide with existing prefixes such as
gpt- -> openai; adding one would silently misroute) and pin current behaviour
with table-driven tests
- match models.dev provider by host for ollama.com using the measured registry id
"ollama-cloud"
- include ollama_cloud (and opencode_go) in the codex model catalog platform list
- let reverse-proxy ollama_cloud accounts pick the anthropic auth scheme via extra
(official host still forces Bearer)
- use the adaptive chat-protocol base url in the upstream billing probe
- add ollama_cloud to the remaining admin UI badges and spec expectations
C15/E18/E19: add the authoritative ollama_cloud default model catalog
(DefaultOllamaCloudModelIDs, /v1/models measured 2026-09-12, 20 entries
incl. the two tagged snapshots) and wire it into every default-model path:
- service: defaultModelsListCandidateIDs ollama case + composite candidates
- handler: defaultModelIDsForPlatform ollama case + composite array, and
the /v1/models end-of-chain guard now falls back to the catalog instead
of an empty list (Claude leak guard kept)
- frontend: getModelsByPlatform 'ollama_cloud' case mirrors the same
static table (cross-referencing comments both sides, pinning tests on
both sides), and upstreamSyncPlatforms opens real upstream sync
E20/E28 verified already done in 656accae0 (ChannelsView arrays +
ChannelMonitorView.grok.spec provider count 11).
Frontend half of increment 5-2 (mirrors backend 39b8649df):
- Add ollama_cloud to the Provider union, channelMonitor constants
(PROVIDER_OLLAMA_CLOUD, PROVIDERS, DEFAULT_OLLAMA_CLOUD_ENDPOINT =
https://ollama.com; the probe adapter appends /v1/chat/completions,
same source as the backend DefaultOllamaCloudBaseURL), the monitor
form provider grid / endpoint preset, the filter bar, and the
template manager tabs. ollama_cloud supports all three check modes
and chat_completions only, so no antigravity-style restriction and
no default-model preset (backend only defaults grok's model).
- Extend providerLabel/badge/picker/gradient (stone palette, aligned
with utils/platformColors.ts), the user MonitorCard icon tint, and
the ProviderIcon exhaustive map with the official llama mark.
- i18n: monitorCommon.providers.ollama_cloud and
admin.groups.platforms.ollama_cloud in en+zh.
- ChannelsView: add ollama_cloud to platformOrder and
compositePlatforms (backend isConcreteRequestPlatform already
includes it); no per-platform extra config needed - matching
opencode_go, which also carries none in the channel form.
- Update the stale ChannelMonitorView.grok.spec.ts provider count
8 -> 11 (the grid already had 10 before this change and the spec
was failing on the clean baseline).
Increment 5-2a of the ollama_cloud plan (backend half):
- M-1: accept provider=ollama_cloud for channel monitors (create/update
binding oneof) and request templates (create binding oneof, historical
short list intentionally not extended to the CN platforms); add the
service-side monitorProviders/probeCapableProviders entries, an OpenAI-
compatible chat adapter and merge-mode denylist entry; replace-mode body
validation intentionally stays lenient (opencode_go precedent).
- C36: route ollama_cloud accounts in TestAccountConnection to protocol-
aware probes (adaptive = CC + Anthropic + native Responses; pinned
protocols = single endpoint) instead of the Claude tester that appended
?beta=true; default the empty model to the account's first outbound
model; share the native Responses probe with opencode_go; resolve the
platform-default Anthropic base for pinned-anthropic accounts.
- C29: quota-mode monitors read the OllamaCloudUsageService snapshot from
account extra (no live fetch) and map windows/balance/plan to
MonitorQuotaSnapshot; ineligible accounts (e.g. reverse-proxy base_url)
and missing/failed snapshots yield explainable errors with the snapshot
fetched_at instead of the generic usage-query error.
- C28: verified no change needed - monitorAccountQuotaCapability already
allows ollama_cloud via its default branch.
- Pin the composite default-model candidate list: ollama_cloud explicitly
contributes no static default list (admin_group.go), aligning with
gateway_handler.
- api_contract_test: default_platform_quotas goldens now include ollama_cloud
(actual settings response is correct; goldens were stale)
- api_contract_test: stubAccountRepo.GetByIDs returns the bulk-update fixture
accounts (101/102) required by the BulkUpdateAccounts prefetch
- openai_gateway: conversation gate rejects only non-null values
(gjson Type != Null); conversation: null is treated as an omitted field and
forwarded, with a Forward-layer regression test covering both paths
- ollama_cloud pricing gate: message now states the global base pricing
requirement and that channel/group-only pricing is not accepted; doc comment
records the deliberate stricter-than-runtime design limitation
- save-time gate on admin account create/update (and AccountService, which has
no production consumers but is the spec-mandated location): non-empty
model_mapping values and empty-mapping allowed_models lists must all resolve
via GetModelPricing, otherwise 400 MODEL_PRICING_MISSING
- request-time gate: ollama_cloud accounts no longer fall into the global
zero-cost path when pricing is unavailable; explicit 4xx instead
- operational preflight SQL documented as comments (not a migration)
- include ollama_cloud in the billing model candidate filter (S1) so claude-*
names can no longer be priced at Anthropic rates for this platform
- keep ollama_cloud out of the LiteLLM platform map on purpose (comment only)
- refresh a stale comment in upstream_billing_probe.go
B2-②: add fallbackPrices entries for the 8 ollama-exclusive cloud models
(gpt-oss:120b/20b, gemma4:31b, mistral-large-3:675b, qwen3.5:397b,
nemotron-3-super/nano:30b/ultra) with official per-token rates, plus
exact/prefix family rules in getFallbackPricing. gpt-oss tiers and the
three nemotron tiers are matched precisely (no bare gpt-oss/nemotron
prefix); models without a published cached-input tier bill cached input
at the input rate instead of 0.
B2-①: two-level pricing lookup for ":tag" model names. Shared helper
normalizePricingModelNameForLookup yields the stripped candidate; wired
into getModelPricingAt (full chain rerun, pricingAt preserved),
matchGroupModelPricing (exact retry) and lookupChannelPricingNormalized
(third retry after the codex normalization; applyChannelOverrides
inherits it). Literal name always wins, so bedrock canonical keys like
us.anthropic.claude-sonnet-4-5-20250929-v1:0 are never destructively
stripped; normalizeChannelPricingModelName stays untouched.
Tests: full /v1/models listing pinned with hit paths, tag-strip and
fail-closed behavior, bedrock double-key regression at base/channel/
group layers.
- C31: include ollama_cloud in SupportsNativeCNResponses so /v1/responses
ingress routes to the platform-native endpoint instead of degrading to
raw CC, and the stateless normalize hook (store=false + strip
previous_response_id) now applies to ollama accounts
- D2/C37': reject the stateful conversation field with an explicit 400
invalid_request_error on native Responses accounts instead of silently
dropping context; normalizeDeepSeekResponsesRequestBody now returns
([]byte, error) with all three production call sites propagating the
typed error as a client-visible 400
- D1': clamp max_tokens for non-DeepSeek models too on ollama.com
upstreams (raw CC, native Responses, Anthropic Messages); the host
check is the boundary, the >65535 upstream 400 is model-independent;
delete the now-dead isOllamaCloudRawChatCompletionsAccount predicate
- C39: mark ollama_cloud accounts force_responses in the Responses
probe (per-protocol, no network probe) and let the admin handler
schedule the probe for ollama_cloud accounts
E17: account for ollama_cloud explicitly in both usage-cell computeds.
Empirically the cell already renders via the generic api-key root branch
(eligible -> OllamaCloudUsageCell + today-stats, ineligible -> '-'
placeholder), because eligibility itself is server-driven
(ollama_cloud_usage.eligible, fixed backend-side in the previous
commit); so the computeds pin that behavior instead of flipping to the
scrolling-window root branch, which would drop today-stats rows and
fire /usage calls the backend rejects for api-key accounts.
- showUsageWindows: explicit ollama_cloud api-key branch -> false
(generic api-key branch renders the Ollama cell)
- shouldFetchUsage: document why ollama_cloud stays unfetched (backend
/usage rejects api-key accounts; data arrives via account payload and
the dedicated refresh endpoint, same shape as CN platforms)
- tests: eligible renders OllamaCloudUsageCell without /usage fetch;
missing/eligible=false renders placeholder, never CN quota cells