# NousResearch/hermes-agent · Alibaba Coding Plan model identity workaround fixes

## Open now

- 1 issue, 1 PR open on GitHub.
- #66134: Model-identity workaround no longer fires for alibaba-coding-plan (stale provider name check)
- PR #66135: fix(agent): drive model-identity workaround from provider profile

These issues and pull requests address a bug where the Alibaba Coding Plan provider returns an incorrect model identity, and track iterative fixes to the workaround logic including a stale provider name check.

## TL;DR

- 6 member(s): 1 open issue(s), 1 closed issue(s), 1 open PR(s), 1 merged PR(s), 2 PR(s) closed without merging.
- A fix was merged to main in PR #2314. Verify it addresses your case.
- **Recommended:** read PR #2314 (and any competing PRs below) before filing. Confirm the merged change covers your symptom.

## Maintainer resolution verdict

- Internal-tracker verdict over this cluster's issue members: `partially_resolved` · deciding PR(s): `pr-2314`. This is distinct from the fix status above. Weigh it yourself.

## How this cluster was grouped

- Link evidence (`STRUCTURAL_PARTIAL`): some members are connected by structural evidence (shared changed files, or a closing/superseded reference); the rest are joined by an automated relevance judgement over their text.
- Members outside that structural core may belong to a different underlying problem.
- Pairwise link density `0.29`: the share of member pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36. `1.00` means every pair is linked.

## Open related issues

- #66134: Model-identity workaround no longer fires for alibaba-coding-plan (stale provider name check)

## Closed / duplicate issues

- #2300: \[Bug\]:  Alibaba Coding Plan Provider Returns Incorrect Model Identity

## Prior & competing PRs

- **#2314: fix(agent): inject model identity for Alibaba Coding Plan**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `run_agent.py`
  - fix hunks:
  - `run_agent.py`

    ```diff
    @@ -2329,6 +2329,18 @@ def _build_system_prompt(self, system_message: str = None) -> str:
                 timestamp_line += f"\nProvider: {self.provider}"
             prompt_parts.append(timestamp_line)
     
    +        # Alibaba Coding Plan API always returns "glm-4.7" as model name regardless
    +        # of the requested model. Inject explicit model identity into the system prompt
    +        # so the agent can correctly report which model it is (workaround for API bug).
    +        if self.provider in ("alibaba-coding-plan", "alibaba-coding-plan-anthropic"):
    +            _model_short = self.model.split("/")[-1] if "/" in self.model else self.model
    +            prompt_parts.append(
    +                f"You are powered by the model named {_model_short}. "
    +                f"The exact model ID is {self.model}. "
    +                f"When asked what model you are, always answer based on this information, "
    +                f"not on any model name returned by the API."
    +            )
    +
             platform_key = (self.platform or "").lower().strip()
             if platform_key in PLATFORM_HINTS:
                 prompt_parts.append(PLATFORM_HINTS[platform_key])
    ```
- **#2302: fix:   Alibaba Coding Plan Provider Returns Incorrect Model Iden**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#2314`
- **#2304: fix(agent): inject model identity for Alibaba Coding Plan to work around API returning wrong model name**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `#2314`
- **#66135: fix(agent): drive model-identity workaround from provider profile**. open
  - maintainer direction: category `partial_fix`; implication `needs_llm`; refs `aba229badca4`, `#66134`, `#66135`, `#374151`
  - files: `agent/system_prompt.py`, `plugins/model-providers/alibaba-coding-plan/__init__.py`, `plugins/model-providers/alibaba/__init__.py`, `providers/base.py`, `tests/agent/test_system_prompt.py`

## Fix status

- Merged to main in PR #2314 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-03-21`. This confirmation is old and may be out of date (a revert/reopen would not have invalidated it here); re-verify.
- Subsystem: `agent`
