11 Commits

Author SHA1 Message Date
teknium1
21d28dfe00 fix: key the ACP named-provider swap on is_user_defined, not slug-name collision
build_model_state dropped every inventory row whose slug name matched a
named `providers:` entry and relabelled the current provider `custom:<key>`
unconditionally. When a `providers:` key shadows a canonical provider name
(providers.openrouter: -> proxy with a models: list), a session genuinely
running on openrouter.ai lost all canonical rows and its current id became
custom:openrouter:..., which resolves to the proxy base_url — picking the
"current" row silently re-routed the session to a different endpoint.

Only rows flagged is_user_defined are replaced by the named catalogs now,
and the current provider is promoted to custom:<key> only when the session
base_url matches that entry's api_url or no canonical row for the raw key
exists (the reported relay/MixedCase class keeps its custom:<key> id).

Review finding: named entry shadowing a canonical provider dropped canonical rows and re-routed the current session to the proxy.
2026-09-15 04:50:31 -07:00
KoNit-K
dcaf346856 fix(acp): deduplicate configured provider model ids 2026-09-15 04:50:31 -07:00
Teknium
7a33369e81 simplify(compat): interrupt — drop _ThreadAwareEventProxy/_interrupt_event legacy alias, repoint 2 test files
No runtime consumer read the proxy (terminal_tool/environments call is_interrupted()/set_interrupt()
directly); its only users were tests patching tools.interrupt._interrupt_event, which had no effect on
the code under test. tools/terminal_tool.py's own re-export of the name is owned by another worker.
2026-09-03 14:00:59 -07:00
Teknium
c93ace77c2 simplify(compat): config/runtime_provider/plugins/commands/secrets_cli/kanban — drop 96 re-exports (incl. PEP 562 facades) + 3 aliases (get_pre_tool_call_directive/_block_message, get_telegram_handler_factories), repoint 56 callers + 50 test files 2026-09-03 14:00:17 -07:00
Teknium
7b8c11bcf7 simplify(compat): models — drop 52 re-exports from hermes_cli.models, repoint 16 callers + 41 test files 2026-09-03 13:48:49 -07:00
Teknium
1e6cfaa0d0 simplify(compat): setup/model_switch/nous_subscription — drop 34 re-exports, repoint 14 callers + 26 test files (~100 sites) 2026-09-03 13:33:10 -07:00
Teknium
a26343bbcd refactor(acp): model_catalog entry field access via one local accessor; declared ids via dict.fromkeys 2026-09-02 19:27:29 -07:00
Teknium
756724c32c refactor(acp): model_catalog row loop guards merged; named-catalog description assembled in one list 2026-09-02 19:25:26 -07:00
Teknium
07ae6d4b16 refactor(acp): AST-neutral bracket packing pass 2 (118 cols) + docstring closer folds 2026-09-02 19:06:54 -07:00
Teknium
cbd2011900 refactor(acp): move picker assembly into model_catalog.build_model_state; server keeps only the fallback row 2026-09-02 18:25:53 -07:00
Teknium
e75ae38ff5 refactor(acp): extract content.py (prompt blocks -> OpenAI content) and model_catalog.py (picker rows) out of server.py 2026-09-02 18:22:51 -07:00