Close gaps: GLM-judge (anthropic registry) + run cancel + deep-link
ci / gates (push) Has been cancelled
ci / rust (push) Has been cancelled
ci / sandbox-k8s (push) Has been cancelled
ci / frontend (push) Has been cancelled
ci / e2e (push) Has been cancelled

#2 GLM judge (closes #114): registry NamedProvider gains a `format` field;
build_provider_registry builds an AnthropicProvider for format="anthropic".
GLM's coding/OpenAI endpoint is ToS-throttled for raw SDK, but its Anthropic
endpoint (api.z.ai/api/anthropic) accepts raw API calls (verified x-api-key
-> glm-4.7), so CLAWMATES_JUDGE_MODEL=glm:glm-4.7 routes the door governor /
topology judge through GLM with no runtime-routing. (Kimi-as-judge still needs
a Platform key — coding key is agent-only.)

#3 run-control: POST /api/topology-runs/{id}/cancel (workspace-scoped,
queued/running only); the worker honors it at the step boundary (checks
current_status in the checkpoint callback) and won't clobber a cancel with
`failed`. Frontend Run tab gains a Cancel button and clickable recent runs
that deep-link into a live/replayed stream (SSE replays from checkpoint).

cm-* tests (incl. new cancel test) + clippy + frontend lint/typecheck green.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
Omar Sobh
2026-06-18 03:07:41 -07:00
co-authored by Claude Opus 4.8
parent f845dfb15f
commit 6e87433c66
10 changed files with 199 additions and 18 deletions
+11 -3
View File
@@ -60,10 +60,18 @@ fn build_provider_registry(config: &AppConfig) -> cm_runtime::ProviderRegistry {
for p in &config.llm.providers {
match std::env::var(&p.api_key_env) {
Ok(key) if !key.is_empty() => {
let provider: Arc<dyn LlmProvider> =
Arc::new(OpenAiCompatProvider::new(p.base_url.clone(), Some(key)));
let provider: Arc<dyn LlmProvider> = match p.format.as_str() {
"anthropic" => Arc::new(cm_llm::AnthropicProvider::with_base_url(
key,
p.base_url.clone(),
)),
_ => Arc::new(OpenAiCompatProvider::new(p.base_url.clone(), Some(key))),
};
map.insert(p.name.clone(), provider);
println!("clawmates-server: registered LLM provider '{}'", p.name);
println!(
"clawmates-server: registered LLM provider '{}' ({})",
p.name, p.format
);
}
_ => eprintln!(
"clawmates-server: provider '{}' skipped — {} is unset",