Skip to content

fix: filter fastapi-only params#1112

Open
francisdbillones wants to merge 1 commit into
feldroy:mainfrom
francisdbillones:1073-hardcoded-fastapi-params
Open

fix: filter fastapi-only params#1112
francisdbillones wants to merge 1 commit into
feldroy:mainfrom
francisdbillones:1073-hardcoded-fastapi-params

Conversation

@francisdbillones
Copy link
Copy Markdown
Contributor

What

I explicitly defined the kwargs we're passing with fixed values into Air's internal FastAPI instance, and made the app factory raise a ValueError that points them to the fastapi_app route if they try to pass their own values instead.

Fixes issue #1073

Pattern

Followed the existing app factory pattern.

Reviewer Focus

I don't think any special attention is required from the reviewers.

Checklist

  • Diff contains only changes for this task — no unrelated refactoring or cleanup
  • Addresses exactly one issue or feature
  • New or changed behavior has test coverage
  • This is the simplest viable approach
  • AI provenance section removed or accurate

Copy link
Copy Markdown
Member

@pydanny pydanny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @francisdbillones, thanks so much for this PR. It's a nice catch that will help on these sorts of cases. I have one question about a single line of code, I look forward to a better understanding. 😄

Comment thread src/air/applications.py
"deprecated",
}

if kwargs_supplied := extra.keys() & fastapi_kwargs_with_fixed_values:
Copy link
Copy Markdown
Member

@pydanny pydanny Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we testing fastapi_kwargs_with_fixed_values here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants