MCPcopy Index your code
hub / github.com/FSoft-AI4Code/CodeWiki / validate

Method validate

codewiki/cli/models/config.py:141–158  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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."""

Callers 1

saveMethod · 0.80

Calls 3

is_caw_providerFunction · 0.90
validate_model_nameFunction · 0.90
validate_urlFunction · 0.90

Tested by

no test coverage detected