feat(management): type mcp_enabled, router_introspection_enabled, cors_origins on APIInfo (0.7.1)#18
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Types three previously-untyped fields on the Management API "API" object and
releases them as a patch (0.7.0 → 0.7.1). Types/tests/docs only — no transport
or behavior change.
What changed
APIInfonow types three fields, with defaults for forward/backwardcompatibility with older servers:
mcp_enabled: bool— whether the MCP endpoint is exposed (defaultTrue)router_introspection_enabled: bool— whether router introspection isexposed (default
True)cors_origins: list[str]— allowed browser origins for cross-origin reads(empty = off,
["*"]= any origin); server-validated and normalized. Coverspublic read traffic only — writes still require a key.
create_apiexample usingcors_originsin the management-client guide.0.7.1(single-sourced insrc/foxnose_sdk/_version.py).Setting these via
create_api/update_apialready worked (the payload ispassed through) — this only adds the typed fields on the response model.
Testing
parsing, omitted-field defaults, and unknown-field tolerance.
ruff check+ruff format --checkclean on changed files.Compatibility
Non-breaking. Responses from older servers (without the fields) parse with sane
defaults (CORS off, agent features on); unknown response fields are ignored.