Whether the main-loop model can call the advisor tool. Mirror of TS ``modelSupportsAdvisor`` at typescript/src/utils/advisor.ts:89. The USER_TYPE=ant escape hatch matches the TS behavior so internal users can dogfood advisor on unreleased model strings.
(model: str | None)
| 75 | |
| 76 | |
| 77 | def model_supports_advisor(model: str | None) -> bool: |
| 78 | """Whether the main-loop model can call the advisor tool. |
| 79 | |
| 80 | Mirror of TS ``modelSupportsAdvisor`` at typescript/src/utils/advisor.ts:89. |
| 81 | The USER_TYPE=ant escape hatch matches the TS behavior so internal users |
| 82 | can dogfood advisor on unreleased model strings. |
| 83 | """ |
| 84 | m = (model or "").lower() |
| 85 | return ( |
| 86 | "opus-4-6" in m |
| 87 | or "sonnet-4-6" in m |
| 88 | or os.environ.get("USER_TYPE") == "ant" |
| 89 | ) |
| 90 | |
| 91 | |
| 92 | def is_valid_advisor_model(model: str | None) -> bool: |