Skip to content

Conversation

@stackloke2e
Copy link
Contributor

Summary

This PR updates the ToolHive API models generated from the latest OpenAPI specification.

Changes

  • Updated Pydantic models in src/mcp_optimizer/toolhive/api_models/

Notes

  • This PR was automatically generated by the update-thv-models workflow
  • The models are generated using datamodel-codegen from ToolHive's OpenAPI endpoint

🤖 Generated with GitHub Actions

Automated update of ToolHive API models from OpenAPI specification.
@claude
Copy link

claude bot commented Nov 27, 2025

PR Review

Summary

Auto-generated update to ToolHive API models from OpenAPI spec. Changes look good overall.

Findings

✅ Good practices:

  • Properly generated code with consistent timestamps
  • Follows native Python typing (uses list instead of List)
  • New models follow existing patterns

📝 Code organization:

  • runner.py:11-21: Good refactoring - moved RemoteAuthConfig to dedicated remote.py module, improving separation of concerns
  • New tokenexchange.py module properly structured with clear field descriptions
  • Import cleanup in runner.py removes unused imports (registry module no longer directly imported)

⚠️ Minor observations:

  1. registry.py:97: Period at end of description differs from other fields - inconsistent punctuation in generated models (RFC 8707 with/without period)
  2. tokenexchange.py:26-28: header_strategy field has multiline description but no validation for the mentioned enum values (HeaderStrategyReplace, HeaderStrategyCustom) - though this is acceptable for generated models
  3. v1.py:19-20: Description spans both allow_private_ip purposes but field name does not reflect both registry and API URL - minor clarity issue

🔍 No issues found with:

  • Breaking changes (refactored RemoteAuthConfig → remote.Config is backward compatible via imports)
  • Security concerns
  • Performance
  • Type safety
  • Regressions

Recommendation

Approve - This is a clean auto-generated update. The code quality is good and follows project conventions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants