feat(providers): add NEAR AI Cloud provider - #9352
Conversation
Signed-off-by: Pierre LE GUEN <26087574+PierreLeGuen@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5253511d7a
ℹ️ 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 "@codex address that feedback".
| } | ||
|
|
||
| if Self::PROVIDERS_NEEDING_STANDARD_CHAT_PARAMS.contains(&self.name.as_str()) { | ||
| obj.remove("reasoning_effort"); |
There was a problem hiding this comment.
Preserve reasoning_effort for NEAR OpenAI reasoning models
Removing reasoning_effort for all nearai chat requests discards user-selected thinking levels for NEAR-hosted OpenAI reasoning models (for example openai/o3-mini and openai/gpt-5*). In this codebase, those models are recognized as reasoning-capable and the request builder emits reasoning_effort from model suffixes / thinking settings; stripping it here makes settings like -high or -none silently ineffective, which changes model behavior without warning.
Useful? React with 👍 / 👎.
jamadeo
left a comment
There was a problem hiding this comment.
Looks good. I think on our side we can do a better job of expressing the ways in which providers might need to change the shape of the API structure. But that can happen outside this scope.
Signed-off-by: Pierre LE GUEN <26087574+PierreLeGuen@users.noreply.github.com>
Summary
Adds NEAR AI Cloud as a fixed declarative OpenAI-compatible provider so users can configure
NEARAI_API_KEYand usehttps://cloud-api.near.ai/v1.Implementation Notes
nearaiprovider metadata with dynamic model discovery and TEE-oriented fallback models.Testing
cargo fmtcargo test -p goose nearaicargo test -p goose providers::openai::tests::sanitizecargo test -p goose providers::openai::tests::responses_api_routing_uses_model_family_unless_path_forces_chatRelated Issues
None.