agentscope-ai / agentscope-ai/AgentTeams

CoPaw: model-switch `--no-reasoning` is a no-op (unlike OpenClaw)

Ouverte
#1,126 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
bug
Langage dominant
Go
Étoiles
5.6k
Forks
692
Merge moyen
5 j 4 h
PR mergées (30 j)
23

Description

## Bug Description

Environment (where reproduced):
- Install: AgentTeams embedded / Docker (local)
- Version: v1.2.0-class (`2ea0274`)
- `AGENTTEAMS_MANAGER_RUNTIME=copaw`
- `AGENTTEAMS_LLM_PROVIDER=qwen` (DashScope / Bailian via AI Gateway)
- `AGENTTEAMS_DEFAULT_MODEL=qwen3.7-plus`
- OS: macOS (Docker Desktop)

What happened:
When Manager runtime is CoPaw, running `update-manager-model.sh --no-reasoning` logs `reasoning=false` but does **not** persist any CoPaw-side setting that disables thinking. OpenClaw correctly sets `reasoning: false` on the model entry; the CoPaw branch ignores `$REASONING` and only updates model id / context window.

For DashScope Qwen hybrid models (`qwen3.x-plus`), thinking stays enabled on the real chat path, adding multi-second latency per turn. Health preflight already sends `enable_thinking=false` (`copaw/src/copaw_worker/health.py`), but normal chat does not.

What I expected:
`--no-reasoning` should persist something CoPaw chat honors, equivalent to OpenClaw's `reasoning: false` — e.g. `generate_kwargs.extra_body.enable_thinking=false` on the provider / active model entry (modern: `providers/custom/*.json` + `active_model.json`; legacy: `providers.json`).

## Steps to Reproduce

1. Install AgentTeams with `AGENTTEAMS_MANAGER_RUNTIME=copaw` and a Qwen hybrid model (e.g. `qwen3.7-plus`).
2. Inside the Manager container:

```bash
bash /opt/agentteams/agent/skills/model-switch/scripts/update-manager-model.sh qwen3.7-plus --no-reasoning
```

3. Inspect the CoPaw provider store:

```bash
jq '.generate_kwargs, [.extra_models[]? | select(.id|test("qwen")) | {id, generate_kwargs}]' \
~/.copaw.secret/providers/custom/agentteams-gateway.json
```

4. Observe: script logs `reasoning=false`, but provider JSON has no `enable_thinking=false` (and chat still emits thinking / high TTFT).

## AI Analysis

Tool used: Cursor

Analysis:
Root cause is in `manager/agent/skills/model-switch/scripts/update-manager-model.sh`:
- CLI parses `--no-reasoning` → `REASONING=false` and logs it.
- OpenClaw path writes `.models.providers["agentteams-gateway"].models[].reasoning = $reasoning`.
- CoPaw path only updates model id / `active_llm` / context window and never uses `$REASONING`.
- Modern CoPaw layout is `~/.copaw.secret/providers/custom/agentteams-gateway.json` (+ `active_model.json`), while the script originally targeted legacy `~/.copaw.secret/providers.json`.

Additionally, Worker bridge (`copaw_worker/bridge.py`) did not map openclaw.json `reasoning: false` into CoPaw `generate_kwargs`, so Workers stay inconsistent even when Controller marks the model non-reasoning.

## Relevant Logs

```text
[agentteams] Updating Manager model: qwen3.7-plus (ctx=200000, max=64000, reasoning=false, input=["text", "image"])
[agentteams] Testing model reachability: .../v1/chat/completions (model=qwen3.7-plus)...
[agentteams] Model test passed (HTTP 200)
[agentteams] Done. CoPaw model is now: qwen3.7-plus (ctx=200000)

# provider store after --no-reasoning (pre-fix): no enable_thinking
generate_kwargs: {}
qwen3.7-plus.generate_kwargs: {}
```

Gateway latency check (same model, request-level flag):

```text
enable_thinking=false ~1.0s reasoning_content=no
enable_thinking=true ~4.5s reasoning_content=yes
```

## Component

Manager Agent

(also affects CoPaw Worker via missing bridge mapping of `reasoning: false`)

## Version / Commit

`2ea0274` (AgentTeams v1.2.0-class install; Manager runtime=copaw; model=`qwen3.7-plus`)

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.