add declarative provider support to goose-providers crate - #9992
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c321f25282
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1e59ad3746
ℹ️ 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".
1e59ad3 to
522808c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 522808c525
ℹ️ 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".
522808c to
202d67f
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 202d67f188
ℹ️ 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".
202d67f to
1ddf9da
Compare
1ddf9da to
542d7f4
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 542d7f4649
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a0b9758578
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: da209359e7
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f5b460d27b
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f979827ba5
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e2e99d52a7
ℹ️ 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".
| pub required: bool, | ||
| #[serde(default)] | ||
| pub secret: bool, | ||
| /// When true, the field is shown prominently in the UI (not collapsed). |
There was a problem hiding this comment.
this comment is a bit suspect in the new world
There was a problem hiding this comment.
yeah we should drop it (the flag itself). Can do that in a follow-up
| @@ -0,0 +1,30 @@ | |||
| { | |||
There was a problem hiding this comment.
these are copies from what we ship with? how do we keep them in sync?
There was a problem hiding this comment.
They are, but this is just for example code. Which could drift yes. Once we move all of the declarative definitions into goose-providers, we can switch this to reference those, and they'll have the unit test that checks validity
| } | ||
| } | ||
|
|
||
| pub fn from_custom_config( |
There was a problem hiding this comment.
we should make a call on whether we want to call them declarative or custom (or something else). in the client it makes some sense to distinguish but I don't think it does from an API perspective.
There was a problem hiding this comment.
I think declarative is a closer description of what this is. The terminology is mixed because they mean slightly different things in goose app land.
| @@ -2,8 +2,10 @@ use super::api_client::ApiClient; | |||
| use super::base::{ConfigKey, MessageStream, Provider, ProviderMetadata}; | |||
There was a problem hiding this comment.
do we need custom provider support for Ollama? I think the reason we started out with this, is that it didn't need an API key and originally we couldn't make the distinction. but now it is just the same as openai, no?
There was a problem hiding this comment.
Hm, good question. Is that really the only reason we have it? I imagine there are probably other differences under the hood but I cannot say for sure.
There was a problem hiding this comment.
goose points out that ollama-shaped providers will use native ollama apis like /api/tags. We could probably rework it to combine them?
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3167101d7a
ℹ️ 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".
|
|
||
| let format_options = format_options_for_provider(config.preserves_thinking); | ||
|
|
||
| let mut api_client = ApiClient::new_with_tls(config.base_url, auth, tls_config)?; |
There was a problem hiding this comment.
Preserve Anthropic base URL query parameters
When an Anthropic-compatible declarative provider uses a base URL with required query parameters (for example a gateway that routes by ?api-version=...), this passes the URL directly as the ApiClient host. ApiClient::build_url later joins v1/messages/v1/models against that host, which drops the base query; unlike the OpenAI constructor, no with_query call re-adds it, so every request is sent without those required parameters.
Useful? React with 👍 / 👎.
* main: fix: tolerate partial Responses output items (#10108) fix(databricks): always use OpenAI-compatible "parameters" for tools (#10101) fix(providers): unescape shell-escaped image paths (#10098) chore(deps-dev): bump js-yaml from 4.1.1 to 4.2.0 in /documentation (#10107) regenerate schema (#10166) chore(deps): bump actions/stale from 10.1.1 to 10.3.0 (#10050) chore(deps): bump actions/attest-build-provenance from 4.1.0 to 4.1.1 (#10049) chore(deps): bump pnpm/action-setup from 6.0.8 to 6.0.9 (#9892) Update EmpirioLabs provider display name to EmpirioLabs AI (#10126) add declarative provider support to goose-providers crate (#9992) fix(desktop): seed mac auto-update config (#10132) Update release testing instructions (#10122)
for #9803