fix(provider-openai-codex): improve credential handling and function … - #460
Conversation
…availability checks - Updated README to clarify fallback behavior when the auth-credentials vault is not running. - Enhanced identity prompts to support batch function calls for improved efficiency. - Refactored authentication functions to check for availability before attempting token operations, preventing unnecessary errors. - Added tests for function list parsing to ensure robustness against malformed entries.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
skill-check — worker0 verified, 41 skipped (no docs/).
Four for four. Nicely done. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughRouter client gains function-availability detection so vault-dependent calls degrade gracefully when target functions aren't registered. Auth import and token refresh flows in auth.rs and stream_fn.rs are updated to use these availability-aware wrappers. README troubleshooting text and identity.txt prompt instructions are also revised. ChangesVault availability-aware auth flow
Identity Prompt Guidance Updates
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant StreamFn as fetch_fresh_credential
participant RouterClient
participant EngineFunctions
participant Vault
StreamFn->>RouterClient: get_token_if_available(provider)
RouterClient->>EngineFunctions: LIST_FUNCTIONS
EngineFunctions-->>RouterClient: function list
RouterClient->>Vault: auth::get_token (if registered)
Vault-->>RouterClient: credential
RouterClient-->>StreamFn: Ok(Some(credential))
alt credential near expiry
StreamFn->>RouterClient: refresh_if_available(provider)
RouterClient->>EngineFunctions: check refresh function registered
alt refresh available
RouterClient->>Vault: trigger OAuth refresh
Vault-->>RouterClient: Ok(true)
StreamFn->>RouterClient: get_token_if_available(provider)
RouterClient-->>StreamFn: Ok(Some(refreshed credential))
else refresh unavailable
RouterClient-->>StreamFn: Ok(false)
StreamFn-->>StreamFn: return existing near-expiry credential
end
end
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…lippy) Pre-existing clippy::collapsible_if failure from #460, unrelated to this PR's change but blocking CI on this branch since it touches provider-openai-codex/Cargo.lock. No behavior change.
…ult on thinking-capable models (#462) * (MOT-3929) fix(provider-anthropic): surface adaptive thinking by default on thinking-capable models With no explicit thinking_level, build_thinking_config always returned config: None, so thinking-capable models (Sonnet 4.6+, Opus 4.7+, Fable/Mythos 5) never got adaptive reasoning unless the caller asked for a level. provider-xai surfaces reasoning by default with no explicit level; this brings provider-anthropic to parity. Gated on supports_thinking == Some(true) specifically, so an unknown or explicitly non-thinking model never gets the implicit default and can't 400. Cargo.lock churn across the other providers/approval-gate is from the harness v1.1.12 bump (iii-sdk/iii-helpers version resolution). * fix(provider-openai-codex): collapse nested near_expiry/refresh if (clippy) Pre-existing clippy::collapsible_if failure from #460, unrelated to this PR's change but blocking CI on this branch since it touches provider-openai-codex/Cargo.lock. No behavior change. * ci: pass GITHUB_TOKEN to the iii install script to avoid rate limits install.iii.dev's install.sh calls the GitHub API to resolve the release; unauthenticated it's capped at 60/hr and intermittently fails "interface boot smoke" jobs across workers (hit twice on this PR alone). The script's own error message points at $GITHUB_TOKEN, so export the job's token to lift the cap to the authenticated rate.
…availability checks
Summary by CodeRabbit
New Features
Bug Fixes
Documentation