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

PR Review - ToolHive API Models Update

Overall Assessment: ✅ Approved

This PR successfully updates the ToolHive API models from the latest OpenAPI specification. The changes are well-structured and follow good practices.

Key Changes

  • Refactored RemoteAuthConfig → moved to new remote.Config module (better organization)
  • Added tokenexchange.py module with OAuth 2.0 token exchange support (RFC 8693)
  • Added resource field for OAuth 2.0 resource indicators (RFC 8707)
  • Added token_exchange_config field to RunConfig
  • Updated imports in runner.py to use new module structure

Code Quality ✅

  • Clean refactoring: extracted RemoteAuthConfigremote.Config (reduced duplication)
  • Proper use of Pydantic models with field descriptions
  • Follows project conventions (native types: list over List, dict over Dict)
  • Auto-generated code is properly tagged with timestamps

No Issues Found

  • No breaking changes (internal class rename with proper import updates)
  • No regressions (old RemoteAuthConfig not used elsewhere in codebase)
  • No security concerns (OAuth config models for defensive security tooling)
  • New modules follow same patterns as existing code

Minor Observations

  • remote.Config class name is generic but acceptable for auto-generated code
  • All new OAuth fields properly documented with RFC references

Recommendation: Merge ✅

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