MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / is_valid_advisor_model

Function is_valid_advisor_model

src/utils/advisor.py:92–102  ·  view source on GitHub ↗

Whether a model string is allowed in the ``model`` field of the advisor tool schema. Identical predicate to ``model_supports_advisor`` in the TS reference (typescript/src/utils/advisor.ts:99).

(model: str | None)

Source from the content-addressed store, hash-verified

90
91
92def is_valid_advisor_model(model: str | None) -> bool:
93 """Whether a model string is allowed in the ``model`` field of the
94 advisor tool schema. Identical predicate to ``model_supports_advisor``
95 in the TS reference (typescript/src/utils/advisor.ts:99).
96 """
97 m = (model or "").lower()
98 return (
99 "opus-4-6" in m
100 or "sonnet-4-6" in m
101 or os.environ.get("USER_TYPE") == "ant"
102 )
103
104
105def is_advisor_enabled(provider: "BaseProvider | None") -> bool:

Calls 1

getMethod · 0.45