Skip to content

Conversation

@stackloke2e
Copy link

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 15, 2025

Review Summary

This PR updates auto-generated ToolHive API models but introduces breaking changes that will cause import errors.

Critical Issues

Breaking Changes - Import Errors 🔴

The deleted registry.py module is still imported in multiple files:

  • src/mcp_optimizer/toolhive/toolhive_client.py:15
  • src/mcp_optimizer/install.py:6
  • src/mcp_optimizer/ingestion.py:33
  • tests/test_install.py:10,139,162

Classes moved from registry.pytypes.py:

  • ImageMetadata
  • RemoteServerMetadata
  • Registry
  • EnvVar
  • Header
  • Metadata
  • OAuthConfig

Required Fix: Update all imports to use types module instead of registry.

Additional Observations

Code Structure

  • New modules added: remote.py, tokenexchange.py - good modularization
  • runner.py correctly updated imports (lines 11-20) - use this as reference pattern
  • OAuthConfig gained resource field (RFC 8707 support) - backward compatible

Type Safety

  • All changes maintain Pydantic validation
  • Optional fields preserved correctly
  • No security concerns in generated models

Recommendation

Do not merge until imports are fixed. Run uv run pyright src/mcp_optimizer to verify.

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