Enhance Anthropic message conversion and update model mappings - #244
Enhance Anthropic message conversion and update model mappings#244Harsh502s wants to merge 5 commits into
Conversation
…opic format - Add support for system-role messages in Anthropic message arrays (non-standard but sent by Claude Code) - Update convert_anthropic_messages() to return tuple of (inline_system_prompt, unified_messages) - Extract system messages from message array and merge into explicit system prompt during conversion - Update AnthropicMessage model to accept "system" role in addition to "user" and "assistant" - Add alias resolution layer in get_model_id_for_kiro() to normalize model names before hidden model lookup - Update convert_anthropic_tools() call site to unpack new tuple return value - Update all test cases to handle new tuple return format from convert_anthropic_messages() - Add debug logging for extracted inline system messages and resolved model aliases
feat(converters): extract and merge inline system messages from Anthr…
…allback models - Add claude-sonnet-5 to HIDDEN_MODELS with internal mapping - Add claude-opus-4.8 to HIDDEN_MODELS with internal mapping - Add claude-sonnet-5 to FALLBACK_MODELS list - Add claude-opus-4.8 to FALLBACK_MODELS list - Improve HIDDEN_MODELS documentation with format clarification - These newer model versions are available on Kiro but not advertised in /ListAvailableModels
|
Thanks for the PR! 🎉 Before merge, we need a one-time CLA confirmation. Full CLA text: Please reply once with: You need to write once, all further messages from me can be ignored. |
- Add _probe_model() function to check model availability via minimal API requests - Add _probe_candidate_models() function to concurrently probe multiple models with semaphore limiting - Replace static model list fetch with dynamic model discovery for all endpoints - Import CANDIDATE_MODELS from config for probing against known model candidates - Use model probing results to populate available models list at account initialization - Log detailed information about available and unavailable models during discovery - Handle various HTTP status codes intelligently (200=available, 4xx=unavailable, 5xx/429=optimistic, 403=assume exists) - Add optimistic assumptions for timeouts and inconclusive responses to avoid false negatives - Enables dynamic model discovery across both runtime and standard Kiro API endpoints
|
Thanks for the PR! 🎉 Before merge, we need a one-time CLA confirmation. Full CLA text: Please reply once with: You need to write once, all further messages from me can be ignored. |
|
@Harsh502s could you give a try to this gateway: https://github.com/ankitcharolia/kiro-gateway It works quite well with All AI harness and actively being developed. The most important thing is that it is ACP compliant |
Enhance Anthropic message conversion and update model mappings