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

PR Review: Update ToolHive API models

Summary

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

Key Changes

  • New modules: remote.py and tokenexchange.py for OAuth 2.0 token exchange (RFC 8707)
  • Refactoring: Moved RemoteAuthConfig from runner.py to remote.Config (better organization)
  • OAuth enhancement: Added resource field for RFC 8707 compliance in registry and v1 models
  • API expansion: Added api_url field to UpdateRegistryRequest in v1.py

Code Quality

Pass - Auto-generated Pydantic models follow conventions
Pass - Uses native Python types (list, dict) per CLAUDE.md
Pass - Excluded from ruff linting (appropriate for generated code)
Pass - Clear field descriptions for all new fields

Observations

  1. Breaking change potential: runner.py refactors RemoteAuthConfigremote.Config. If external code references runner.RemoteAuthConfig, this breaks. Consider deprecation warning if public API.
  2. Token exchange security: New tokenexchange.Config handles OAuth tokens. Ensure client_secret fields never logged.
  3. Config class naming: Both remote.py and tokenexchange.py use generic Config class name. May cause confusion—consider RemoteConfig/TokenExchangeConfig if manually maintained.

Recommendation

✅ Approve - Safe to merge. Monitor for runtime issues related to RemoteAuthConfig refactoring.

🤖 Review completed in <1 min

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