DocPrompting: Switch GLM-5.3-Flash from Synthetic to OpenRouter
The endpoint stays OpenAI compatible, so only the base url, the key and
the model id change, from hf:zai-org/GLM-5.3-Flash to z-ai/glm-5.3-flash.
An hf: id now fails with a hint rather than being sent somewhere it is
not known, since it survives in local .Renviron files.
OpenRouter serves the model from two dozen hosts and would pick one by
availability, which the tests cannot use: the hosts differ in
quantization, and in how long they take for a documentation prompt by
more than two orders of magnitude - one second on Baseten against seven
minutes on GMICloud. So the hosts are named and everything outside the
list ruled out, which keeps a change in the generated code about the
Readme rather than about which machine answered.
The list has to hold more than one, and not because a host might be down:
OpenRouter reaches them through pools it shares between all of its users,
rather than through our key, and those pools are regularly exhausted. Of
ten prompts pinned to Baseten alone, two came back rate-limited. A
Baseten key of one's own, entered under Settings -> Integrations, takes
that away for the host at the front; Relace and Z.ai carry what is left,
at some fifteen seconds and tens of seconds against Baseten's one. The
timeout is five minutes for their sake, and
RKORAP_OPENROUTER_PROVIDER overrides the whole list.
Relace is the cheapest of the hosts and the quickest of those on shared
capacity, but it serves the model in fp4 where the others use fp8, which
is why it is not at the front: what the tests measure should not depend
on how coarsely a machine was quantized. It solved the collocation task
in five of five runs all the same.
Needs OPENROUTER_API_KEY as a masked variable in the GitLab project.
Change-Id: Iba289424970aa933d58798be4c4b07b74c02f2f6
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d697bad..860ce78 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -42,7 +42,8 @@
# once they are: "gemini-3.5-flash-lite", "claude-sonnet-5", "gpt-5-nano".
# Exported here rather than declared under variables:, since a project or
# instance variable of that name would take precedence over the latter.
- - export RKORAP_LLM_MODELS="hf:zai-org/GLM-5.3-Flash"
+ # Needs OPENROUTER_API_KEY as a masked project variable.
+ - export RKORAP_LLM_MODELS="z-ai/glm-5.3-flash"
- start_section docprompting "Prompting LLMs with the Readme"
- echo -e "apt-cache\nccache\nrlib" >> .Rbuildignore
- R -q -e 'devtools::test(filter = "readme-against-llm")'