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)
| 90 | |
| 91 | |
| 92 | def 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 | |
| 105 | def is_advisor_enabled(provider: "BaseProvider | None") -> bool: |