Todo2code currently owns a direct OpenRouter transport and therefore ignores
the central Z.AI-first policy and shared credential file. The least invasive
repair is inside the existing src/llm/** boundary: resolve a single semantic
route from the Python SubLLM package, then translate the already validated
structured request onto the selected OpenAI-compatible provider. Existing
extractors, synthesis stages and public APIs do not need to change.
Provider selection must happen before the request. Runtime errors after a paid request starts are not replayed through a second provider. The bridge may hold the selected credential in memory, as existing Python consumers do, but must never include it in subprocess output, errors, audits or persisted metadata.
todo2code plus its semantic function to SubLLM and verify route
ordering, identity and credential-shape behavior.src/llm/** that invokes the installed
Python package without a shell, resolves public route metadata, reads only
the selected credential under SubLLM’s validated file contract and caches
it in memory.user_id and request_id; OpenRouter gets its attribution headers and
stable user; OpenRouter-only plugins are omitted for direct Z.AI.ticket-074-subllm-routing.IN_PROGRESS / EDIT before changing executable files.todo2code/semantic, consumes only
its selected credential, exposes only public route metadata and fails closed
when explicitly enabled without a usable SubLLM package.zai / glm-5.2, returned the
exact marker and reported 157 total tokens without exposing a credential.IN_PROGRESS / VALIDATION, then returned to EDIT after the
required-LLM run exposed provider-stale audit configuration and parser labels.IN_PROGRESS / VALIDATION.31596459305 approved all five exact-head chunks with
GLM-5.2 and no blocking findings. Publication merged as main@ceae696;
post-merge CI 31596778339 passed every required job.