@automatalabs/acp-agents 0.24.0 → 0.24.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/acp-client.js +10 -2
- package/package.json +1 -1
package/dist/acp-client.js
CHANGED
|
@@ -1669,8 +1669,10 @@ function flattenSelectOptions(options) {
|
|
|
1669
1669
|
}
|
|
1670
1670
|
/**
|
|
1671
1671
|
* Best-effort match of a model spec (`provider/modelId`, a bare `modelId`, or a tier word)
|
|
1672
|
-
* against the agent's catalog. Tries, in priority order: exact spec, exact
|
|
1673
|
-
*
|
|
1672
|
+
* against the agent's catalog. Tries, in priority order: exact spec, the exact spec with its
|
|
1673
|
+
* `[effort]` bracket stripped (so `zai/glm-5.2[max]` matches its own provider's `zai/glm-5.2`
|
|
1674
|
+
* before any cross-provider lookalike), exact id-after-slash, the bare base id (bracket
|
|
1675
|
+
* stripped, so `gpt-5.1-codex[high]` matches a
|
|
1674
1676
|
* bare `gpt-5.1-codex` model value while the bracket separately drives reasoning_effort), the
|
|
1675
1677
|
* Codex `base[effort]` encoding, exact option name, then substring fallbacks. The effort
|
|
1676
1678
|
* bracket itself is applied via applyModelModifiers, not folded into the model select.
|
|
@@ -1678,10 +1680,16 @@ function flattenSelectOptions(options) {
|
|
|
1678
1680
|
function matchModelValue(values, spec) {
|
|
1679
1681
|
const afterSlash = spec.includes("/") ? spec.slice(spec.indexOf("/") + 1) : spec;
|
|
1680
1682
|
const fullLower = spec.toLowerCase();
|
|
1683
|
+
const fullBaseLower = stripEffortBracket(fullLower);
|
|
1681
1684
|
const idLower = afterSlash.toLowerCase();
|
|
1682
1685
|
const baseLower = stripEffortBracket(afterSlash).toLowerCase();
|
|
1683
1686
|
const tests = [
|
|
1684
1687
|
(value) => value.value.toLowerCase() === fullLower,
|
|
1688
|
+
// The provider-prefixed spec with the bracket stripped ("zai/glm-5.2[max]" ->
|
|
1689
|
+
// "zai/glm-5.2") — without this, a bracketed spec whose provider serves a model
|
|
1690
|
+
// that OTHER providers also list never exact-matches and falls through to the
|
|
1691
|
+
// substring tests, which can pick a different provider's entry for the same model.
|
|
1692
|
+
(value) => value.value.toLowerCase() === fullBaseLower,
|
|
1685
1693
|
(value) => value.value.toLowerCase() === idLower,
|
|
1686
1694
|
(value) => value.value.toLowerCase() === baseLower,
|
|
1687
1695
|
(value) => value.value.toLowerCase().startsWith(`${baseLower}[`),
|