(exc: Exception)
| 89 | |
| 90 | |
| 91 | def _is_unsupported_reasoning_error(exc: Exception) -> bool: |
| 92 | text = str(exc).lower() |
| 93 | if "reasoning" not in text and "effort" not in text: |
| 94 | return False |
| 95 | unsupported_tokens = ( |
| 96 | "unsupported", |
| 97 | "not supported", |
| 98 | "unknown parameter", |
| 99 | "unrecognized", |
| 100 | "invalid parameter", |
| 101 | "extra inputs are not permitted", |
| 102 | "unexpected keyword", |
| 103 | ) |
| 104 | return any(token in text for token in unsupported_tokens) |
| 105 | |
| 106 | |
| 107 | class OpenAILLM: |