Repository navigation
fix(providers): point Perplexity provider at the Agent API - #13627
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
80e89d1 to
b5b9807
Compare
b5b9807 to
38b6676
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 38b6676dd6
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@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: 53a80647d1
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@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: ee03f26fbc
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
Confirming that #12709 can cover the Agent API migration. The documented /v1/responses alias, model catalog change, and shared null-content parser fix fit that scope. The endpoint and parser regressions are covered, and Rust CI passed.
Please address the Nemotron thinking-effort finding before merge. ACP shows only Off for the newly bundled reasoning model and can display Off even when Goose sends an inherited higher effort. Resolve its reasoning capability from the Agent API catalog and verify that ACP exposes and reports the selected effort.
Please also confirm one authenticated end-to-end streaming run on the updated PR head. The reported authenticated Goose streams were on the first two commits. The current head had authenticated request replay, and the live-provider CI jobs were skipped.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dd14d7a600
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@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: cdcd0a2e8a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@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: 39ec9b05e4
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| { "name": "openai/gpt-5.6-sol", "context_limit": 1050000 }, | ||
| { "name": "openai/gpt-5.6-terra", "context_limit": 1050000 }, | ||
| { "name": "openai/gpt-5.6-luna", "context_limit": 1050000 }, | ||
| { "name": "openai/gpt-5.5", "context_limit": 1050000 }, |
There was a problem hiding this comment.
Preserve supported temperatures for Agent API OpenAI models
With GOOSE_TEMPERATURE configured and this new Perplexity model selected, create_responses_request_for_model() silently drops the setting because openai_reasoning_for_model() returns true and temperature is only emitted for non-OpenAI-reasoning models. The bundled perplexity-agent/openai/gpt-5.5 row explicitly declares temperature: true, so a supported sampling setting never reaches the Agent API. Unlike the fixed Nemotron case, this model takes the genuine OpenAI branch, which the added Nemotron payload test does not cover. Apply the Agent catalog's temperature capability separately from the OpenAI reasoning classification.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
This rule was in the code before this PR. The shared OpenAI Responses formatter does not read the temperature flag in the catalog. For gpt-5.5, the formatter does not send the value of GOOSE_TEMPERATURE on the native openai provider or on perplexity. It does send an explicit request_params.temperature. A change to that rule for OpenAI reasoning models is not part of the move of the bundled perplexity definition to the Agent API.
39ec9b0 to
d695cf7
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d695cf7cdc
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@jbg, here are the results for the two checks. The PR head is e9679e7.
The eight Codex review threads from November 17 and 18 have replies. Codex found two more problems at d695cf7: effort with a reasoning summary and an explicit non-reasoning override. Commit e9679e7 corrects the two problems. The only production change is in The branch is on top of main after the oi-kit crate rename (#13447). |
jbg
left a comment
There was a problem hiding this comment.
Thanks for the live streaming and ACP checks. The temperature rule is already in the shared Responses formatter, so I’d treat catalog-aware temperature handling as a follow-up. Could you rebase pplx-provider-fix onto main and rerun the authenticated streaming and ACP checks on the updated head?
Some Responses API backends send "content": null on message items in response.output_item.added, where OpenAI sends an empty array. The stream parser rejected the whole stream with "invalid type: null, expected a sequence". Deserialize a null content field as an empty list on both output item shapes. Add a test that parses a captured event.
The bundled Perplexity definition has a bare base_url, so the OpenAI engine derives v1/chat/completions and every request returns 404. Perplexity's Chat Completions surface is retired; the supported surface is the Agent API, which speaks the OpenAI Responses API at /v1/responses. Set base_path to v1/responses. The engine already routes a responses base path through its Responses API code, so no engine change is needed. Replace the model list with the documented Agent API catalog (vendor-prefixed IDs; anthropic/claude-opus-5-5 first as the default) and point model_doc_link at the Agent API models page. Context limits come from the bundled canonical registry where present, otherwise from the model family. Streaming stays on. The Agent API sends "content": null on response.output_item.added where OpenAI sends []; the parser accepts that since the previous commit. Saved configs that name a retired model need to pick a model from the new list. Add regression tests for the request URL, the Responses payload shape, and the model list.
Set catalog_provider_id "perplexity-agent" on the bundled Perplexity definition. ProviderEntry::normalize_model_config passes it to with_provider_vision_support (provider_registry.rs:83-85), which is the only path that resolves supports_vision for catalog rows such as perplexity/kimi-k3. The lookup under the provider name "perplexity" cannot reach that row and name inference has no Kimi branch, so without the key the Responses formatter drops images with "[image omitted: model does not support vision]". Add a test that registers the bundled definition and checks that perplexity/kimi-k3 resolves supports_vision true and perplexity/glm-5.3 resolves false.
The bundled Perplexity provider targets the Agent API (/v1/responses) with anthropic/claude-opus-5-5 as the default model. ACP advertises Off, Low, Medium, High, and Max for that model, but the selected effort never reached the request. create_responses_request_for_model (crates/goose-provider-types/src/formats/openai_responses.rs) only sets reasoning.effort when ModelConfig::openai_reasoning_for_model returns true, which is false for every non-OpenAI model in perplexity.json, and then strips thinking_effort as an internal param. Claude, Gemini, Grok, and perplexity/* models went out with no reasoning field, while openai/* models used OpenAI catalog clamping (for example openai/gpt-5.5 sent "none" for Off and "xhigh" for Max). The Agent API accepts reasoning.effort for every model it serves with levels minimal, low, medium, high, xhigh, and max, and rejects "off" with 400. In crates/goose-providers/src/openai.rs, map Off, Low, Medium, High, and Max to minimal, low, medium, high, and max for the perplexity provider in stream_for_model unless request_params already sets reasoning or reasoning_effort, and omit reasoning when no thinking effort is configured. Other Responses API providers are unchanged. Add unit tests covering the effort mapping, omission when unset, explicit param precedence, and provider scoping.
Session configs feed the ACP thinking selector without provider normalization, so a bundled Perplexity model whose catalog row declares reasoning, such as Nemotron, showed only off and reported off even when an inherited effort was sent. Resolve reasoning from the declarative provider's catalog row during materialization.
Writing the catalog row's reasoning flag onto the session model config made openai_reasoning_for_model() treat Perplexity Nemotron and Kimi, and renamed custom providers with a catalog_provider_id, as OpenAI reasoning models. Responses and Chat Completions then dropped GOOSE_TEMPERATURE and applied the o-series request changes. Resolve catalog reasoning in the ACP thinking selector instead, keyed by the session provider, so the model config stays as it was before. The selector also clamped perplexity/kimi-k3 and perplexity/glm-5.3* to low, high and max by model name, while the Agent API mapping sends minimal and medium. OpenAiProvider::maps_all_responses_thinking_efforts now backs both the request mapping and the selector, so Perplexity offers every effort and reports off and medium as set. Native Kimi and GLM providers keep their three levels.
The provider catalog fallback in is_reasoning_model_for_provider marked a catalog reasoning model as reasoning for any provider. A renamed custom provider with catalog_provider_id fireworks-ai was then offered every thinking effort, but the request mapper sends none of them for that provider, so the menu changed nothing. The catalog lookup now runs only for providers that map every effort (maps_all_responses_thinking_efforts). Every other provider resolves reasoning as on main: explicit reasoning, then is_reasoning_model().
Bundled perplexity declares catalog_provider_id perplexity-agent but no max_tokens, and the canonical lookup by provider name has no perplexity mapping, so it fell back to another service's row: perplexity/deepseek-v4-pro-0813 got 393216 output tokens instead of the perplexity-agent 384000, and perplexity/nemotron-3.5-super-120b-a12b got no limit instead of 131072. apply_canonical_limits now reads the declared catalog_provider_id and applies that row's output limit before the provider name lookup. The new ModelConfig::with_canonical_output_limit sets only max_tokens, so the catalog row cannot set reasoning and switch the OpenAI request into its reasoning-model shape.
For perplexity, the previous mapper did not add the selected effort if request_params contained reasoning or reasoning_effort. The mapper adds effort only for the perplexity provider. It does not add an effort if the model configuration sets reasoning to false. It also keeps explicit request settings: a string in reasoning_effort or a field named effort in the reasoning object. Without these overrides, the mapper adds the selected thinking effort and keeps the other reasoning fields. Without a selected thinking effort, the mapper adds nothing. The default requests for the bundled models do not change.
e9679e7 to
a3294c6
Compare
|
@jbg, the branch is rebased on The authenticated checks ran again on a
Agreed on temperature: catalog-aware handling stays out of this PR. |
jbg
left a comment
There was a problem hiding this comment.
The rebased revision addresses the ACP reasoning-effort finding. Thanks for rerunning authenticated streaming and checking the selected effort in the request log on this head. Catalog-aware temperature handling can follow separately.
Closes #12709
Summary
#12709 asked for the endpoint fix first and the Agent API migration later. Perplexity ended Chat Completions support on 2026-09-27 (https://docs.perplexity.ai/docs/agent-api/migrate-from-sonar/overview), so an endpoint-only fix would point goose at a retired endpoint. This PR does the migration directly: the provider definition and its tests, plus a small parser fix so the stream works.
I work at Perplexity, which operates this API.
Root cause:
perplexity.jsonsets a barebase_urland nobase_path(diagnosed by @iilish in #12709). For a bare URL the OpenAI engine derivesv1/chat/completions(derive_base_pathincrates/oi-kit-providers/src/openai.rs), a path the API no longer serves, so every request returns 404.Nine commits. The first eight were rebased on 2026-11-19 onto
mainatbf074d6.mainrenamed thegoose-providersandgoose-provider-typescrates tooi-kit-providersandoi-kit-provider-types(#13447); the paths below use the new names, and the first seven commits were otherwise unchanged in that rebase (range-diff shows path renames only). All nine commits were rebased again on 2026-11-30 ontomainat09f368c.fix(providers): accept null content on Responses output items(crates/oi-kit-provider-types/src/formats/openai_responses.rs). The Agent API streamsresponse.output_item.addedwith"content": nullon message items where OpenAI sends[]. goose's parser rejected the whole stream withinvalid type: null, expected a sequence. A nullcontentnow deserializes as an empty list on both output item shapes. The new testoutput_item_added_accepts_null_contentparses the event as captured from the live API; it fails onmain.fix(providers): point Perplexity provider at the Agent API.crates/oi-kit-providers/src/declarative/definitions/perplexity.jsonbase_path: "v1/responses". The OpenAI engine already routes any base path containingresponsesthrough its Responses API code (should_use_responses_apiinopenai.rs), so no engine change is needed.v1/agentwould not work here: it does not match that check, so goose would keep sending Chat Completions payloads (the 400 "unknown field messages" seen in Provider Perplexity: Fails with Resource not found (404) #11568).anthropic/claude-opus-5-5first as the provider default). Context limits come from the bundled canonical registry where present and from the model family otherwise.dynamic_modelsis left unset;/v1/modelson this host returns the catalog in OpenAI list shape, so discovery works and the static list is the fallback.model_doc_linknow points at https://docs.perplexity.ai/docs/agent-api/models.supports_streamingstays on. The parser fix in the first commit is what makes that work.crates/oi-kit-providers/src/openai.rs: two tests.perplexity_requests_agent_api_responses_endpointasserts the built provider targetshttps://api.perplexity.ai/v1/responses, selects the Responses API for an Agent API model id, and builds aninputpayload with nomessagesfield.perplexity_lists_agent_api_model_idsasserts the list is vendor-prefixed withanthropic/claude-opus-5-5first. Both fail onmain.fix(providers): set Perplexity catalog id for vision resolution. Setscatalog_provider_id: "perplexity-agent"inperplexity.json.normalize_model_configpasses it towith_provider_vision_support(provider_registry.rs:83-85), the only path that resolvessupports_visionfor catalog rows such asperplexity/kimi-k3; the lookup under the provider nameperplexitycannot reach that row and name inference has no Kimi branch, so without the key the Responses formatter emits[image omitted: model does not support vision]for it. Addsbundled_perplexity_resolves_vision_from_catalogincrates/goose/src/config/declarative_providers.rs, which registers the bundled definition and checks that the key is present,perplexity/kimi-k3resolvessupports_vision: true, andperplexity/glm-5.3resolvesfalse. Without the key the test fails at its first assertion (the key check); with that assertion removed, it fails atperplexity/kimi-k3withleft: None, right: Some(true).fix(providers): send thinking effort for Perplexity Agent API models(crates/oi-kit-providers/src/openai.rs). ACP offersOff,Low,Medium,High, andMaxfor the defaultanthropic/claude-opus-5-5, but the selected effort never reached the request.create_responses_request_for_model(openai_responses.rs:781-798) only readsthinking_effortwhenModelConfig::openai_reasoning_for_model(model.rs:326-337) is true, which returns false for every non-OpenAI model inperplexity.json, and lines933-937stripthinking_effortas an internal param;openai/*entries used OpenAI catalog clamping (openai/gpt-5.5sent"none"forOffand"xhigh"forMax). The Agent API acceptsreasoning.effort(minimal,low,medium,high,xhigh,max) for every model it serves and rejects"off"with 400.stream_for_modelnow mapsOff/Low/Medium/High/Maxtominimal/low/medium/high/maxfor theperplexityprovider unlessrequest_paramsalready setsreasoningorreasoning_effort, and omitsreasoningwhen no thinking effort is configured. Other Responses API providers are unchanged. Adds payload tests incrates/oi-kit-providers/src/openai.rscovering the mapping, omission when unset, explicit param precedence, and provider scoping.fix(providers): resolve reasoning capability from the provider catalog. ACP builds the thinking effort choices from the sessionModelConfig, whichapply_canonical_limits("perplexity", ...)fills from the canonical table under the provider name, so the bundled Nemotron model resolvedreasoning: Noneand ACP offered onlyOff(Codex finding). This commit filledmodel.reasoningfrom the declarative provider'scatalog_provider_idrow incrates/goose/src/model_config.rsand addedtest_build_config_options_resolves_reasoning_from_provider_catalogincrates/goose/src/acp/response_builder.rs, which drivesmodel_config_from_user_configandbuild_config_optionsand fails on the previous head (offinstead ofhigh). Themodel_config.rspart is reverted by the next commit; the test stays.fix(providers): keep catalog reasoning out of the OpenAI request shape. Two Codex findings on the previous commit: settingmodel.reasoning = Some(true)madeModelConfig::openai_reasoning_for_modelclassify Nemotron, Kimi and renamed custom providers with non-inferable ids as OpenAI reasoning models, so the Responses and Chat Completions formatters droppedGOOSE_TEMPERATUREand applied the o-series shape (summary: auto,reasoning.encrypted_content,developerrole); and ACP still name-matchedperplexity/kimi-k3andperplexity/glm-5.3*as native always-on models, advertising onlylow/high/maxwhile the request mapper sendsminimalandmedium. The catalog lookup moves out ofmodel_config.rs(now unchanged frommain) intocrates/goose/src/acp/response_builder.rs:build_thinking_effort_choicestakes the provider selection, resolves reasoning from an explicitmodel_config.reasoning, then thecatalog_provider_idrow, then the model-name check, and skips the native Kimi/GLM clamp whenOpenAiProvider::maps_all_responses_thinking_efforts(provider)is true. That predicate (crates/oi-kit-providers/src/openai.rs) is the one the request mapper already uses, so the menu and the wire stay in step; native Kimi/GLM providers keeplow/high/max. Tests:bundled_perplexity_keeps_temperature_for_catalog_reasoning_models(crates/goose/src/config/declarative_providers.rs, bundled definition against a mock server, assertstemperaturekept andreasoning == {"effort": "max"}with noinclude),catalog_reasoning_keeps_openai_request_shape_for_renamed_provider(crates/goose/tests/catalog_reasoning_registry.rs, custom provider withcatalog_provider_id: fireworks-aion bothchat/completionsandresponses),test_build_config_options_offers_every_effort_the_provider_maps(four cases:kimi-k3off and medium,glm-5.3off,glm-5.3-flashmedium) andtest_build_config_options_prefers_explicit_reasoning_over_provider_catalog. The first three fail on the previous commit.fix(acp): consult the catalog for reasoning only where effort is sent(crates/goose/src/acp/response_builder.rs). Codex finding on the previous commit: the catalog fallback also fired for renamed custom providers (for examplecatalog_provider_id: fireworks-aiwith a DeepSeek model), offering five efforts that the request never carries. The catalog lookup now runs only whenOpenAiProvider::maps_all_responses_thinking_efforts(provider)is true, so every other provider behaves as onmain.test_build_config_options_ignores_catalog_reasoning_the_provider_does_not_sendcreates such a custom provider and asserts the menu offers onlyoff; it fails on the previous commit (high, five options).fix(providers): take the output limit from the declared catalog identity(crates/oi-kit-provider-types/src/model.rs,crates/goose/src/model_config.rs). Codex finding:perplexity.jsondeclares nomax_tokens, andapply_canonical_limitsresolved it by provider name, soperplexity/deepseek-v4-pro-0813inherited 393216 from the native DeepSeek row instead of 384000 from theperplexity-agentrow;google/gemini-4-argon(32768 instead of 65536) andperplexity/nemotron-3.5-super-120b-a12b(none instead of 131072) were affected the same way. NewModelConfig::with_canonical_output_limitsets onlymax_tokens, neverreasoning, andapply_canonical_limitsapplies it withcatalog_provider_idbefore the existing provider-name lookup.declared_catalog_identity_sets_output_limit_without_reasoningfails on the previous commit (393216 andNone) and also fails if the catalog row is applied throughwith_canonical_limits, which would reintroduce the temperature regression from the sixth commit.fix(providers): add selected effort and keep other reasoning fields(crates/oi-kit-providers/src/openai.rs). Codex found two problems atd695cf7in code from the fourth commit. First, the mapper did not add the thinking effort whenrequest_paramsset areasoningobject with no effort, for example{"summary": "detailed"}. Second, the mapper could add the selected effort even if the model config setreasoning: false.insert_responses_reasoning_effortadds nothing ifrequest_paramshas a stringreasoning_effortor a nestedreasoning.effortfield. It also adds nothing if the model config setsreasoning: false. Without these overrides, it adds the selected thinking effort and keeps the otherreasoningfields. No bundled model hasreasoning: falseby default. The default requests for the bundled models do not change. With the previous implementation, the three new tests fail.Saved configs that name a model from the old list will need a new model. Pick a model id from
perplexity.jsonor https://docs.perplexity.ai/docs/agent-api/models.Testing
The checks through the seventh commit ran on 2026-11-17 and 2026-11-18 with
mainatb83cb47. The initial gate and live items below ran on the head with the first two commits.cargo fmt --all -- --check: passed.cargo test -p goose-provider-types --lib openai_responses: 73 passed, 0 failed, includingoutput_item_added_accepts_null_content. With the test added tomain'sopenai_responses.rs, it fails.cargo test -p goose-providers --lib: 309 passed, 0 failed (includesall_bundled_providers_are_validand the two new tests). Withmain'sperplexity.jsonrestored, the two new tests fail.cargo clippy -p goose-provider-types -p goose-providers --all-targets -- -D warnings: passed.cargo build -p goose-cli: passed (goose 1.60.0).Live goose sessions on that binary, bundled
perplexitydefinition, empty config dir, real key,goose run -t "Run the shell command: echo agent-api-ok. Then reply with only the command output." --no-session --max-turns 5:GOOSE_MODEL=anthropic/claude-opus-5-5, streaming: tool call, text reply, exit 0. Debug request logs show"stream": trueand aninputpayload on all three requests, no 404, no parse errors.GOOSE_MODEL=openai/gpt-5.6-luna, streaming: same result.supports_streaming: false,anthropic/claude-opus-5-5: tool call, text reply, exit 0, logs show"stream": false.GOOSE_MODELunset: exit 1 with "No model configured. Run 'goose configure' first.", which is goose's normal behavior for a provider with no saved model.Third commit, all three commits in the tree:
cargo fmt --all -- --checkpassed;cargo test -p goose --lib bundled_perplexity_resolves_vision_from_catalogpassed and theconfig::declarative_providersmodule is 22 passed; thegoose-provider-typesandgoose-providersselections above passed again (73 and 309);cargo clippy -p goose-provider-types -p goose-providers -p goose --all-targets -- -D warningspassed. Base proof: with the key removed fromperplexity.jsonand the test's key assertion removed so the model assertion is reached, the test fails atperplexity/kimi-k3withleft: None, right: Some(true).Fourth commit, all four commits in the tree (2026-11-18):
cargo fmt --all -- --checkpassed;cargo test -p goose-providers --libpassed (314 passed, 0 failed, up from 309 at53a80647);cargo clippy -p goose-providers --all-targets -- -D warningspassed;cargo build -p goose-clipassed. Removing theinsert_responses_reasoning_effortcall instream_for_modelfails the two mapping tests (Claude and Kimi payloads have noreasoning;openai/gpt-5.5gets"none"forOffand"xhigh"forMax), forcing the provider guard false fails the scoping test, removing either the"reasoning"or"reasoning_effort"check fails the explicit-param test, and defaulting an unset effort toMediumfails the omission test. A full livegoose runwith a real key did not run on the build machine (no live key there); instead, running the builtgoosebinary on the bundledperplexityprovider with an empty config dir,GOOSE_MODEL=anthropic/claude-opus-5-5,GOOSE_THINKING_EFFORT=high, and an invalid key (401) captured the two request bodies goose logged before exit: the main turn with"reasoning": {"effort": "high"}and the auxiliary title request (ThinkingEffort::Off) with"reasoning": {"effort": "minimal"}. Replaying both logged request bodies verbatim againsthttps://api.perplexity.ai/v1/responseswith a real key returned HTTP 200 andstatus: "completed"on both, echoedreasoning.effortas"high"and"minimal", and returned ashellfunction_callon the main turn and the generated title on the second.Fifth commit, all five commits in the tree (2026-11-18):
cargo fmt --checkpassed;cargo clippy --locked --workspace --all-targets -- -D warningspassed;cargo test --locked --no-fail-fast -p goose -p goose-providers -p goose-provider-types: goose-providers 685 passed, goose-provider-types 314 passed, goose 2261 passed with 5 failures that fail the same way on the previous head without this change (shell PATH, GCP token refresh without egress, two extension mutation tests, and the Codex and Claude Code CLI provider tests). Removing the catalog lookup, using the provider name instead ofcatalog_provider_id, or forcingreasoningto false fails the new test. Live runs through thegooseCLI built atdd14d7a, bundledperplexitydefinition, empty config dir, real key,goose run --no-session --max-turns 5with a shell tool call:anthropic/claude-opus-5-5withGOOSE_THINKING_EFFORT=highandperplexity/nemotron-3.5-super-120b-a12bwithmax. Both exited 0, executed the shell tool, and returned streamed text and usage; the logged requests carrystream: trueandreasoning.efforthighandmaxon the main turns andminimalon the auxiliary title request, withmodel_config.reasoning: truefor Nemotron.Sixth commit, all six commits in the tree (2026-11-18):
cargo fmt --checkpassed;cargo clippy --locked --workspace --all-targets -- -D warningspassed;cargo test --locked --no-fail-fast -p goose -p goose-providers -p goose-provider-types: goose-providers 685 passed, goose-provider-types 314 passed, goose 2269 passed plus the new integration test, with the same pre-existing failures as above. Restoring themodel_config.rschange fails the two temperature tests; making the clamp ignore the provider fails all four menu cases; forcing the predicate true breaks thedatabricks_v2always-on test and the scoping test; ignoring an explicitreasoningfails the override test. Live runs through thegooseCLI built atcdcd0a2, bundledperplexitydefinition, empty config dir, real key, same shell-tool prompt:perplexity/nemotron-3.5-super-120b-a12bwithGOOSE_TEMPERATURE=0.3andGOOSE_THINKING_EFFORT=maxlogstemperature: 0.3andreasoning: {"effort": "max"}with nosummaryorinclude(the previous head loggedsummary: auto);perplexity/kimi-k3withmediumlogsreasoning: {"effort": "medium"}. Both exited 0 with a shell tool call and a streamed reply.Seventh commit, all seven commits in the tree (2026-11-18):
cargo fmt --checkpassed;cargo clippy --workspace --all-targets -- -D warningspassed;cargo test -p goose: 2270 passed with the same pre-existing failures as above. Removing the gate fails the new test; forcing it on failstest_build_config_options_resolves_reasoning_from_provider_catalog. The change is menu-only; the request path is unchanged from the sixth commit.Eighth commit, all eight commits rebased onto
mainatbf074d6(2026-11-19):cargo fmt --checkpassed;cargo clippy --workspace --all-targets -- -D warningspassed;cargo test --locked --no-fail-fast -p goose -p oi-kit-providers -p oi-kit-provider-types: oi-kit-providers 689 passed, oi-kit-provider-types 314 passed, goose 2189 passed with the same pre-existing failures as above. Removing the catalog call fails both test cases; applying the catalog row throughwith_canonical_limitsfails onreasoning; applying it after the provider-name lookup fails on 393216. Live runs through thegooseCLI built atd695cf7, bundledperplexitydefinition, empty config dir, real key,goose run --no-session --max-turns 5:perplexity/deepseek-v4-pro-0813athighlogsmax_output_tokens: 384000(the previous head logged 393216);perplexity/nemotron-3.5-super-120b-a12bathighwithGOOSE_TEMPERATURE=0.3logsmax_output_tokens: 131072,temperature: 0.3andreasoning.effort: high;google/gemini-4-argonatlowlogsmax_output_tokens: 65536. All exited 0 with a reply.Ninth commit, at
e9679e7(2026-11-25):cargo fmt --all -- --checkandcargo clippy --workspace --all-targets -- -D warningsgave exit code 0.cargo test --locked --no-fail-fast -p goose -p oi-kit-providers -p oi-kit-provider-types: 3454 passed and 5 failed. The same 5 tests fail on the previous commit: GCP token refresh, two extension mutation tests, and the Codex and Claude Code CLI provider tests. The removal of each new guard condition causes a test failure.gooseCLI from this commit. The runs used the bundledperplexitydefinition, an empty config dir, and a real key. The prompt was the same shell-tool prompt. The models and effort values wereanthropic/claude-opus-5-5athigh,perplexity/nemotron-3.5-super-120b-a12batmaxwithGOOSE_TEMPERATURE=0.3,perplexity/kimi-k3atmedium, andperplexity/deepseek-v4-pro-0813athigh. Each run made a shell tool call and streamed a reply. Each exit code was 0. The request logs showstream: trueand the selectedreasoning.effort. The DeepSeek request log showsmax_output_tokens: 384000.high. The first config setrequest_params.reasoningto{"summary": "detailed"}. Its request log showsreasoning: {"summary": "detailed", "effort": "high"}. The Nemotron config setreasoning: false. Its request log contains noreasoningfield.goose acp,session/newshowsoff,low,medium,high, andmaxfor Nemotron and Kimi.session/set_config_optiongives the selected value in the response and in theconfig_option_updatenotification. Asession/promptafter that gives a reply, and the request log shows the selected effort.Rebase onto
mainat09f368c(2026-11-30), new heada3294c6: the branch conflicted with fix(providers): send Z.AI thinking levels instead of token budgets #13805 incrates/goose/src/acp/response_builder.rs. Both branches changed the ACP effort menu functions. The sixth commit has the resolution. It keeps the function signatures and Z.AI catalog lookup frommain. For reasoning models, theperplexitymenu uses all five values that its request mapper accepts. Other providers keep the ACP effort behavior frommain. Both branches also added a test at the same position in the test module of that file. The fifth commit now adds its test after the Z.AI test from fix(providers): send Z.AI thinking levels instead of token budgets #13805, and the test text is the same. The branch also conflicted with feat(providers): add OPENAI_DAYBREAK to send access_programs.cyber #13854 incrates/goose/src/model_config.rs. Each branch added a test module at the end of the file. The eighth commit now adds its module after the module frommain. The text of the two modules is the same as before. The diff against09f368chas the same eight files.580299f).cargo fmt --all -- --checkandcargo clippy --workspace --all-targets -- -D warningsgave exit code 0.cargo test --locked --no-fail-fast -p goose -p oi-kit-providers -p oi-kit-provider-types: 3531 passed and 5 failed. Onmainat09f368c, 3508 passed and the same 5 tests failed. The fix(providers): send Z.AI thinking levels instead of token budgets #13805 tests passed: the 6 tests inzai_thinking_effortand the 3 cases oftest_build_config_options_offers_catalog_effort_levels_for_zai. The 7 tests indaybreak_testsfrom feat(providers): add OPENAI_DAYBREAK to send access_programs.cyber #13854 passed.gooseCLI built from tree580299f. The four shell-tool runs used the same setup, models, and prompt as the corresponding runs for the ninth commit. Each of the four CLI runs made a shell tool call, streamed a reply, and gave exit code 0. The main-turn requests show the selectedreasoning.effort. The session-name requests showminimal, which is the value that the provider sends foroff. The DeepSeek requests showmax_output_tokens: 384000.reasoning: {"summary": "detailed", "effort": "high"}. The request log of the Nemotron session contains noreasoningfield. The third config setrequest_params.reasoningto{"effort": "low"}. Its request log showsreasoning: {"effort": "low"}.goose acp,session/newshowsoff,low,medium,high, andmaxfor Nemotron, Kimi, andperplexity/glm-5.3.session/set_config_optiongives the selected value in the response and in theconfig_option_updatenotification. Asession/promptafter that gives a reply. The request logs showreasoning.effort: maxfor Nemotron andreasoning.effort: mediumfor Kimi and GLM.Related Issues
#11568 (same 404; also records a custom provider attempt against
v1/agentthat returned 400 "unknown field messages").Discussion: #12709