Validate all configuration fields. Subscription-mode providers (claude-code, codex) authenticate via the underlying CLI's OAuth and do not require a base URL or fallback model. Raises: ConfigurationError: If validation fails
(self)
| 139 | agent_instructions: AgentInstructions = field(default_factory=AgentInstructions) |
| 140 | |
| 141 | def validate(self): |
| 142 | """ |
| 143 | Validate all configuration fields. |
| 144 | |
| 145 | Subscription-mode providers (claude-code, codex) authenticate via the |
| 146 | underlying CLI's OAuth and do not require a base URL or fallback model. |
| 147 | |
| 148 | Raises: |
| 149 | ConfigurationError: If validation fails |
| 150 | """ |
| 151 | from codewiki.src.be.backend import is_caw_provider |
| 152 | if is_caw_provider(self.provider): |
| 153 | validate_model_name(self.main_model) |
| 154 | return |
| 155 | validate_url(self.base_url) |
| 156 | validate_model_name(self.main_model) |
| 157 | validate_model_name(self.cluster_model) |
| 158 | validate_model_name(self.fallback_model) |
| 159 | |
| 160 | def to_dict(self) -> dict: |
| 161 | """Convert to dictionary.""" |
no test coverage detected