Convert a BYOK model definition from snake_case to camelCase wire format.
(
self, model: ProviderModelConfig | dict[str, Any]
)
| 3376 | return wire |
| 3377 | |
| 3378 | def _convert_model_to_wire_format( |
| 3379 | self, model: ProviderModelConfig | dict[str, Any] |
| 3380 | ) -> dict[str, Any]: |
| 3381 | """Convert a BYOK model definition from snake_case to camelCase wire format.""" |
| 3382 | wire: dict[str, Any] = {} |
| 3383 | if "id" in model: |
| 3384 | wire["id"] = model["id"] |
| 3385 | if "provider" in model: |
| 3386 | wire["provider"] = model["provider"] |
| 3387 | if "wire_model" in model: |
| 3388 | wire["wireModel"] = model["wire_model"] |
| 3389 | if "model_id" in model: |
| 3390 | wire["modelId"] = model["model_id"] |
| 3391 | if "name" in model: |
| 3392 | wire["name"] = model["name"] |
| 3393 | if "max_prompt_tokens" in model: |
| 3394 | wire["maxPromptTokens"] = model["max_prompt_tokens"] |
| 3395 | if "max_context_window_tokens" in model: |
| 3396 | wire["maxContextWindowTokens"] = model["max_context_window_tokens"] |
| 3397 | if "max_output_tokens" in model: |
| 3398 | wire["maxOutputTokens"] = model["max_output_tokens"] |
| 3399 | if "capabilities" in model: |
| 3400 | wire["capabilities"] = _capabilities_to_dict(model["capabilities"]) |
| 3401 | return wire |
| 3402 | |
| 3403 | def _convert_custom_agent_to_wire_format( |
| 3404 | self, agent: CustomAgentConfig | dict[str, Any] |
no test coverage detected