Repository navigation
Release 0.5.5: pick the chat's model per question - #13
Merged
Merged
Conversation
…ed connection The chat answered with one model of the single provider every stage shares. An optional second connection, `chat.connection` (`CHAT_LLM_*`), sits beside `llm` and only the chat reads it. The drawer's select lists the tool-capable models each connection reports, read from the connection rather than from an allowlist; a turn may name only a model the server listed itself, and anything else is a 400 before a model is called. - The pick may change between questions and on regenerate; a new conversation always starts on the configured default, a reopened one on its last turn's model. Nothing is kept in the browser's storage, and there is no fallback between models. - `chat_turn.connection` (V37) records who answered; the turn event and the stored turn name model and connection, and every answer shows its model. - The second connection has a daily ceiling of its own (default 50), taken in one transaction with the chat's, so a refused call counts on neither; `GET /chat/status` names both counters. - `billed` on each connection marks paid models in the select and under the answer; empty means billed for `anthropic` only. - The masker covers both connections; the startup banner shows the second connection with its key masked. Suggestions and the semantic tool stay on the primary connection. New endpoint `GET /api/v1/chat/models`. Reasoning in docs/decisions/chat.md.
The model select pushed the initial bundle 3.55 kB past its 1 MB budget, and the production build refused it. The chat drawer's content and its libraries loaded on every page although most visits never open it. The panel now sits behind `@defer (when chatOpen())`, where `chatOpen` is "a chat model exists and `?chat` is set", so a reload with `?chat=…` still opens it with its content. Once loaded it stays. The header button, its living mark, the minibar and the store stay in the shell. The panel seeds its followed-source comparison from the router's URL when it is built, because the navigation that opened the chat has already happened by then; without that, the first followed source on a phone no longer folded the sheet into the bar. Initial bundle 1.00 MB → 867.29 kB; the `chat-panel` chunk is 139.62 kB. The budget is unchanged.
Spec 025-chat-model-select (ISC-505, ISC-506, ISC-510, ISC-511, ISC-512). - The catalog never holds a lock across the network: discoveries are shared per configuration snapshot, read concurrently, cached from their completion, and an interrupted one is neither cached nor handed on. - Reasons are fixed texts and logs carry only the exception class; a key with a control character is refused before any header is built, and a request carrying a key never follows a redirect. - A connection that needs a key and has none is listed unreachable; the rule lives once, in Providers.missing. - The select names the default explicitly (defaultModelName), drops a pick the catalog no longer offers or whose connection is spent, and keeps the user's pick while no catalog is loaded; the catalog is asked on every drawer open. - The status is kept while it reloads, and a failed refresh shows beside it. - docs/DATA-MODEL.md covers chat_turn.connection and the per-connection budget.
The chat's model select with an optional second connection (spec 025), the chat panel loaded on its first open, and the touch icon for every apple-touch-icon variant. Same seven files as the 0.5.4 bump; StatusControllerTest and app.spec pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The chat's model is picked per question, from the local connection or an optional hosted one, and the version moves to 0.5.5. The tag
v0.5.5follows the merge.What changes
chat.connection(CHAT_LLM_*): an optional second connection besidellm, read by the chat alone, with a daily ceiling of its own (default 50) taken in one transaction with the chat's.llm.billed/chat.connection.billedmark paid models.GET /api/v1/chat/models: the tool-capable models each connection reports, read from the connection, never from an allowlist. A turn may name only a model the server listed itself; anything else is a 400 before a model is called.chat_turn.connection(V37) records who answered.@defer): initial bundle 1.00 MB → 868 kB.Spec
specs/025-chat-model-select(12/12 claims, complete). Reasoning indocs/decisions/chat.md§ A second connection, discovered, not allowlisted.Review five rounds of code review and security review on the branch; the security review found nothing at confidence ≥ 8. Accepted findings and three follow-ups are recorded in the project's working notes.
Verification
./gradlew buildgreen on the final tree (backend 1234 cases, units 1147, browser suite green), production build 868 kB initial. Deployed as dev image0.5.5-dev.7-gbf6d54eon the office instance with an Anthropic second connection; the key answersGET /v1/modelswith 200 from the pod.Deploy note the office chart carries
chat.connectionand theCHAT_LLM_*env (devops355e8a3); an overridepipeline.yamlwithout the block simply runs the chat onllmalone.