feat: implement streaming provider plugin framework#47
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting
| runtime = ProviderRuntimeConfiguration( | ||
| provider=config.provider, | ||
| environment=env_name, | ||
| credentials=credentials, | ||
| options=options, | ||
| asset_types=asset_types, | ||
| data_types=data_types, | ||
| rate_limit_per_minute=rate_limit, | ||
| max_subscriptions=max_subscriptions, | ||
| requires_authentication=( | ||
| env_config.requires_authentication | ||
| if env_config.requires_authentication is not None | ||
| else capabilities.requires_authentication | ||
| ), | ||
| ) | ||
|
|
||
| self._validate_capabilities(capabilities, runtime) | ||
| if runtime.requires_authentication and not runtime.credentials: | ||
| raise ProviderConfigurationError( |
There was a problem hiding this comment.
Enforce provider-required authentication
The runtime configuration lets an environment override requires_authentication (defaulting to env_config.requires_authentication) before credentials are validated. If a provider’s capabilities declare requires_authentication=True, an environment can set requires_authentication=False and omit credentials, and the validator will still succeed because the later check only inspects the overridden flag. This allows misconfigured providers to run without credentials and will fail later at connect time. The validator should refuse configurations that disable authentication when the adapter’s capabilities mark it as required, regardless of environment overrides.
Useful? React with 👍 / 👎.
…eaming-provider docs: update streaming provider documentation
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68e85c14f8c0832ab56011c98a4f6375