Repository navigation
Description
Update 2026-11-26 (infra move): the gateway config moved to dan-petty/homelab.
This issue keeps the prices, CONST_AI_GATEWAY_HOSTED_MODELS, SECURITY.md item 13 and the README text. The three model_list entries, the checks that no pool or fallback names them and the live calls are in the homelab follow-up. A devops-cli test cannot read the gateway config.
Follow-up: dan-petty/homelab#303.
Problem or Motivation
Owner directions (2026-11-13): "I would like to test openrouter models: qwen/qwen3.8-flash - alternative to deepseek; qwen/qwen3.8-max-0902 - smarter model to test if failing task is due to model quality", and "this one is also worth an evaluation: openrouter/auto-code".
The gateway has no group for these three models, so an eval or a trial run cannot name them. These requests replace the 2026-11-02 rule "compare only Sonnet and DeepSeek" for these three models.
A probe on 2026-11-13 sent direct calls to OpenRouter with provider: {data_collection: deny}. It spent about 0.003 USD, and no call reached a Claude model.
| Model | Window | List price, USD per million (input/output/cached input) | Provider | Probe |
|---|---|---|---|---|
qwen/qwen3.8-flash |
1,000,000 | 0.15 / 0.47 / 0.016 | Alibaba only, quantization "unknown" | Served with deny. Tool call and strict json_schema are correct. |
qwen/qwen3.8-max-0902 |
1,000,000 | 2.0 / 6.0 / 0.25 | Alibaba only | Served with deny. Tool call is correct. Strict json_schema output fits the schema, but the answer was wrong once (it read the field "language" as a human language). |
openrouter/auto-code |
2,000,000 | no fixed price (-1): OpenRouter bills the price of the model it picks | the provider of the picked model | Served with deny. All six calls went to openai/gpt-6.1-sol (1.0/5.0 USD per million). Tool call and strict json_schema are correct. |
Two facts limit the config:
- The
quantizations: [fp8]filter of the DeepSeek groups stops a Qwen call:404 "No endpoints found for the request with quantization: fp8". OpenRouter lists the quantization of the Qwen endpoints as "unknown". So a Qwen group has no quantization filter. - The owner holds
claude-sonnet-5-5since 2026-11-11: no trial, eval or comparison with it.openrouter/auto-codecan pick an Anthropic Claude model. The pluginauto-routeracceptsexcluded_models, and the probe showed that OpenRouter enforces it (a request that excluded every allowed model got404 "No router pool model is routable for this request"). The patternsanthropic/*and*/claude-*are the examples of the OpenRouter docs.
Proposed Solution & Architectural Design
Add three hosted trial groups to k8s/llm/gateway/config.yaml of dan-petty/homelab (follow-up issue):
qwen3.8-flash:openrouter/qwen/qwen3.8-flash,data_collection: deny, no quantization filter, window 1,000,000, list prices.qwen3.8-max-0902:openrouter/qwen/qwen3.8-max-0902,data_collection: deny, no quantization filter, window 1,000,000, list prices.auto-code:openrouter/openrouter/auto-code,data_collection: deny, andplugins: [{id: auto-router, excluded_models: ["anthropic/*", "*/claude-*"]}], so it never picks a Claude model. Its window is 2,000,000. Its gateway price is an upper bound from the OpenRouter docs, and the text says that OpenRouter bills the real price.
Also:
- Add the prices to
_HOSTED_GROUP_PRICES(src/devops_cli/ai/spend/pricing.py) and the groups toCONST_AI_GATEWAY_HOSTED_MODELS. - No pool and no fallback names a trial group, and no setting of the Service names one. A caller (an eval or a trial run) names a group to use it.
- Update SECURITY.md item 13 and the hosted-model text of
k8s/README.md.
Target Subsystem
AI & Agentic Review Pipeline
Acceptance Criteria
- A gateway config test proves that each trial group is hosted, asks for
data_collection: deny, has no quantization filter, and that no pool, no fallback and no Service setting names it. The test fails on the base (devops ci fail-to-pass). - The test proves that the
auto-codegroup excludesanthropic/*and*/claude-*. -
tests/ai/spend/test_hosted_group_prices.pypasses with the new groups (the prices are equal in both places). - After the Argo CD sync: one call to each trial group answers through the gateway.
Existing Tool Considered
LiteLLM model_list entries with extra_body, OpenRouter provider routing (data_collection: deny) and the OpenRouter Auto Router plugin (excluded_models) cover the need. No new code.
Related
#5564 (the DeepSeek fallback group, PR #5565, changes the same files), #3152, #4403
Alternatives check of 2026-11-23: in-use.
The repository already uses this tool.
Tool: BerriAI/litellm (https://github.com/BerriAI/litellm), NOASSERTION, last activity 2026-11-23, maintained.
Reason: Searches on the OpenRouter routing and gateway config found little usable text, but LiteLLM, the gateway the repository already runs, forwards extra_body into the OpenRouter request body, so three model_list entries with provider deny, the auto-router plugin and prices cover the need with no new code.
Covers:
- Hosted model groups from
model_listentries in the proxy config - Forwards
extra_body.provider.data_collection: denyto OpenRouter - Passes the
auto-routerplugin withexcluded_modelspatterns - Per-deployment
model_infowindow, prices and response-schema flag
Lacks:
- No guard that keeps trial groups out of pools and fallbacks
- No fixed price for a router-picked model; the group price is an estimate
- No automatic Claude exclusion; the pattern list must be set by hand
- No quantization filter check; OpenRouter reports Qwen endpoints as unknown
Proposed design
Problem statement
The gateway needs three trial groups: qwen/qwen3.8-flash, qwen/qwen3.8-max-0902 and openrouter/auto-code. The gateway config moved to dan-petty/homelab, so homelab#303 adds the three model_list entries and the live checks. This issue updates the spend price table, the hosted-model constant, SECURITY.md item 13 and the k8s/README.md text. The two Qwen groups carry list prices, and auto-code has no fixed price, so the gateway records the billed cost.
Acceptance criteria
Requirement: Hosted group prices
_HOSTED_GROUP_PRICES SHALL hold the list prices of qwen3.8-flash (0.15/0.47/0.016) and qwen3.8-max-0902 (2.0/6.0/0.25) in USD per million, and no fixed auto-code price.
Scenario: The hosted group price test passes
- WHEN
uv run pytest tests/ai/spend/test_hosted_group_prices.pyruns on the change - THEN The test passes with the two Qwen list prices and no fixed
auto-codeprice.
Requirement: Hosted model constant
CONST_AI_GATEWAY_HOSTED_MODELS SHALL name qwen3.8-flash, qwen3.8-max-0902 and auto-code.
Scenario: The settings test passes
- WHEN
uv run pytest tests/config/test_settings.pyruns on the change - THEN The test passes with the three group names in the constant.
Requirement: Security and k8s docs
SECURITY.md item 13 and k8s/README.md SHALL name the three trial groups, the data_collection: deny rule, the auto-code Claude exclusion and its no-fixed-price billing.
Scenario: The docs row passes
- WHEN
uv run devops ci --check --only docsruns on the change - THEN The docs row passes.
Existing Tool Considered
BerriAI/litellm is the open, maintained gateway that the repository already uses. The alternatives check of 2026-11-23 in the issue body records the verdict in-use and lists what the tool covers and lacks. This issue adds no gateway code. The homelab follow-up #303 sets the anthropic/* and */claude-* exclusion patterns by hand, leaves auto-code without a fixed price so LiteLLM records the billed cost, and sets no quantization filter on the Qwen groups. This repository updates the prices, the hosted-model constant and the two documents.
Key questions
- Which files hold the hosted group prices and the hosted group names?:
_HOSTED_GROUP_PRICESis insrc/devops_cli/ai/spend/pricing.py.CONST_AI_GATEWAY_HOSTED_MODELSis insrc/devops_cli/config/constants.py. [sources: src/devops_cli/ai/spend/pricing.py:84, src/devops_cli/config/constants.py:3337] - Which repository holds the gateway
model_listentries and the live checks?: The environment tree lives only in dan-petty/homelab. homelab#303 adds the threemodel_listentries and the live checks. This repository holds no gateway config. [sources: CONTEXT.md] - Which test proves the hosted model constant?:
tests/config/test_settings.pytestsCONST_AI_GATEWAY_HOSTED_MODELS. The test must pass with the three new names. [sources: tests/config/test_settings.py, src/devops_cli/config/constants.py:3337] - Where does the documentation change go?: SECURITY.md item 13 and the hosted-model text of
k8s/README.mdname the trial groups and their rules. [sources: SECURITY.md, k8s/README.md] - How does
_HOSTED_GROUP_PRICESrepresent theauto-codegroup?: It holds no fixed price forauto-code. The group stays out of the fixed-price table, and the gateway records the billed cost of each call. (best practice) [sources: src/devops_cli/ai/spend/pricing.py:84]- Chosen: No fixed price. OpenRouter gives no bound, and LiteLLM 1.111.0 drops the billed cost when a fixed price is set.
- Rejected: Upper-bound estimate. The reply states that no upper bound exists on the gateway side.
- Rejected: Zero price. A zero price hides the real spend that OpenRouter bills.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 13, 2026
Both add a hosted OpenRouter group to the gateway config, but #3144 adds a DeepSeek model while this adds Qwen and auto-code groups.devops-cli-service commentedon Nov 17, 2026
Alternatives check: in-use
Reason: Searches confirmed LiteLLM's gateway model_list takes per-group extra_body and plugins, so the three OpenRouter groups need config only; the issue already names LiteLLM as the tool the gateway uses.
The repository already uses this tool.
Tool: BerriAI/litellm (https://github.com/BerriAI/litellm), NOASSERTION, last activity 2026-11-17, maintained.
Covers:
Lacks:
Searches (9)
Tools considered:
Searches run:
Sources:
A person decides what this check of 2026-11-17 means for the item.
devops-cli-service commentedon Nov 18, 2026
Status set to Ready at 86358b6 (see proposed design in issue body).
devops-cli-service commentedon Nov 27, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.
dan-petty commentedon Nov 27, 2026
The homelab gateway part of this item has a pull request: dan-petty/homelab#618 (for dan-petty/homelab#303).
qwen3.8-flash,qwen3.8-max-0902,auto-code; aliasesopenrouter/qwen/qwen3.8-flash,openrouter/qwen/qwen3.8-max-0902andopenrouter/openrouter/auto-code.auto-codehas NO fixed price: the OpenRouter docs give no pool and no upper bound, and in LiteLLM 1.111.0 a fixed price would make the gateway drop the cost that OpenRouter reports. The gateway records the billed cost of each call. The "upper bound" price of this item does not exist on the gateway side.auto-codesends theauto-routerplugin withexcluded_models: ["anthropic/*", "*/claude-*"](a hard restriction per the OpenRouter docs), not amodelslist (a fallback list).data_collection: deny.devops-cli-service commentedon Nov 28, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.
devops-cli-service commentedon Nov 29, 2026
Released in v0.250.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.250.0
devops-cli-service commentedon Nov 29, 2026
Live since 2026-11-29 16:50 UTC