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

Review of PR #68

❌ Breaking Change Detected

This PR has a critical issue that will break the build. The registry.py module was deleted and its types moved to types.py, but 3 files still import from the old location:

Files that need updating:

  1. src/mcp_optimizer/install.py:6
  2. src/mcp_optimizer/toolhive/toolhive_client.py:15
  3. src/mcp_optimizer/ingestion.py:33

Required fix:

# Change from:
from mcp_optimizer.toolhive.api_models.registry import ImageMetadata, Registry, RemoteServerMetadata

# To:
from mcp_optimizer.toolhive.api_models.types import ImageMetadata, Registry, RemoteServerMetadata

Additional Observations

New functionality added:

  • remote.py: New Config model for remote authentication with OAuth support
  • tokenexchange.py: New Config model for OAuth 2.0 token exchange (RFC 8693)
  • runner.py: Now references remote.Config and tokenexchange.Config
  • types.py: Consolidated registry-related types (moved from registry.py)

API model additions:

  • Added resource field to OAuthConfig (RFC 8707 resource indicator)
  • Added token_exchange_config to RunConfig for token exchange support

Recommendation

Do not merge until the import statements are fixed. The code generation workflow should be updated to run typechecking after generating models to catch these issues automatically.

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