chore: openai reasoning model cleanup#7529
Conversation
…d also use canonical model reasoning data to check whether model is reasoning model
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 61efebd998
ℹ️ 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".
| payload.as_object_mut().unwrap().insert( | ||
| "max_completion_tokens".to_string(), | ||
| json!(model_config.max_output_tokens()), |
There was a problem hiding this comment.
Restore max_tokens for non-reasoning chat completions
This now unconditionally writes max_completion_tokens, but this formatter is shared by multiple non-OpenAI providers (for example openai_compatible, ollama, tetrate, githubcopilot, litellm, and openrouter) that still post to /chat/completions schemas expecting max_tokens; with this change, non-reasoning requests no longer include max_tokens at all, which can cause 400s or silently drop output limits on those backends. Keep max_completion_tokens for reasoning models, but preserve a max_tokens path for standard chat-completions models.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2bb0e8e9d1
ℹ️ 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".
| payload.as_object_mut().unwrap().insert( | ||
| "max_completion_tokens".to_string(), | ||
| json!(model_config.max_output_tokens()), |
There was a problem hiding this comment.
Preserve max_tokens for non-reasoning Databricks requests
create_request now always emits max_completion_tokens in the normal (non-CLAUDE_THINKING_ENABLED) path, so non-reasoning Databricks models no longer receive max_tokens. This path is used for standard Databricks chat invocations (for example llama/claude endpoints), and switching the parameter can cause provider-side 400s or ignored output limits on backends that still implement chat-completions semantics with max_tokens; keep max_completion_tokens only for reasoning-model payloads.
Useful? React with 👍 / 👎.
crates/goose/src/model.rs
Outdated
| } | ||
|
|
||
| pub fn is_openai_reasoning_model(&self) -> bool { | ||
| const PROVIDER_PREFIXES: &[&str] = &["goose-", "databricks-"]; |
There was a problem hiding this comment.
provider or model name? as that seems odd?
There was a problem hiding this comment.
should be DATABRICKS_MODEL_NAME_PREFIXES
michaelneale
left a comment
There was a problem hiding this comment.
much nicer but provider/model name prefix is a little confusing for me.
yes @michaelneale! I was a bit confused initially too. Looking into the code, I found the databricks provider currently is much for block databricks which we know the convention of our model names. If we want to have a general purpose databricks provider, we have to have a common schema for returning the servingpoints. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ace6b450c0
ℹ️ 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 fn is_openai_reasoning_model(&self) -> bool { | ||
| const DATABRICKS_MODEL_NAME_PREFIXES: &[&str] = &["goose-", "databricks-"]; | ||
| const REASONING_PREFIXES: &[&str] = &["o1", "o3", "o4", "gpt-5"]; |
There was a problem hiding this comment.
Keep o2 models classified as reasoning
is_openai_reasoning_model no longer treats o2* names as reasoning models because REASONING_PREFIXES dropped "o2". This helper now drives request shaping in both OpenAI and Databricks formatters, so o2 requests will be sent down the non-reasoning path (including temperature and without reasoning-specific handling), which can trigger 400s or behavior mismatches on endpoints that still expose o2 under o-series semantics.
Useful? React with 👍 / 👎.
* main: feat: add goose-powered release notes generator workflow (#7503)
* main: (46 commits) chore(deps): bump minimatch from 10.1.1 to 10.2.3 in /evals/open-model-gym/suite (#7498) chore(deps): bump swiper from 11.2.10 to 12.1.2 in /documentation (#7368) Better network failure error & antrhopic retry (#7595) feat: make the text bar persistent and add a queue for messages (#7560) fix: outdated clippy command in goosehints (#7590) chore(deps): bump hono from 4.11.7 to 4.12.1 in /evals/open-model-gym/mcp-harness (#7417) chore(deps-dev): bump ajv from 6.12.6 to 6.14.0 in /ui/desktop (#7437) chore(deps): bump ajv from 8.17.1 to 8.18.0 in /evals/open-model-gym/mcp-harness (#7491) chore(deps): bump hono from 4.12.0 to 4.12.2 in /ui/desktop (#7515) chore(deps-dev): bump rollup from 4.57.1 to 4.59.0 in /ui/desktop (#7522) chore(deps): bump minimatch in /ui/desktop (#7572) fix: validate configure probe for streaming providers (#7564) Dockerfile: add missing build/runtime dependencies (#7546) fix(claude-code): Permission routing for smart-approve (#7501) Add base_path field to custom provider config (#7558) fix(cli): avoid debug logging by default in CLI (#7569) fix: panic on corrupted permission.yaml instead of silently allowing all (#7432) (#7458) fix(openai): handle null reasoning effort in Responses API (#7469) Allow GOOSE_NODE_DIR override in batch file (#7422) feat: add analyze platform extension with tree-sitter AST parsing (#7542) ...
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 84e1e20cd6
ℹ️ 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 const DATABRICKS_KNOWN_MODELS: &[&str] = &[ | ||
| "databricks-claude-sonnet-4-5", | ||
| "databricks-claude-3-7-sonnet", | ||
| "databricks-meta-llama-3-3-70b-instruct", | ||
| "databricks-meta-llama-3-1-405b-instruct", |
There was a problem hiding this comment.
Restore removed Databricks models in known model metadata
DATABRICKS_KNOWN_MODELS now omits databricks-claude-3-7-sonnet and databricks-dbrx-instruct, but this constant is still passed into ProviderMetadata::new(...) for the Databricks provider and is used as the static/fallback model catalog exposed to clients. Removing these entries makes still-referenced Databricks models undiscoverable in provider metadata (including UI selection/fallback flows when dynamic model fetch is unavailable), even though the codebase still treats them as valid model names in other places.
Useful? React with 👍 / 👎.
* origin/main: (27 commits)
feat: return structured {stdout, stderr} from shell tool with output schema (#7604)
Improve custom provider creation experience (#7541)
fix(scheduler): schedules added via CLI showing up in UI (#7594)
chore: openai reasoning model cleanup (#7529)
chore(deps): bump hono from 4.12.1 to 4.12.3 in /evals/open-model-gym/mcp-harness (#7585)
chore(deps): bump minimatch from 10.1.1 to 10.2.3 in /evals/open-model-gym/suite (#7498)
chore(deps): bump swiper from 11.2.10 to 12.1.2 in /documentation (#7368)
Better network failure error & antrhopic retry (#7595)
feat: make the text bar persistent and add a queue for messages (#7560)
fix: outdated clippy command in goosehints (#7590)
chore(deps): bump hono from 4.11.7 to 4.12.1 in /evals/open-model-gym/mcp-harness (#7417)
chore(deps-dev): bump ajv from 6.12.6 to 6.14.0 in /ui/desktop (#7437)
chore(deps): bump ajv from 8.17.1 to 8.18.0 in /evals/open-model-gym/mcp-harness (#7491)
chore(deps): bump hono from 4.12.0 to 4.12.2 in /ui/desktop (#7515)
chore(deps-dev): bump rollup from 4.57.1 to 4.59.0 in /ui/desktop (#7522)
chore(deps): bump minimatch in /ui/desktop (#7572)
fix: validate configure probe for streaming providers (#7564)
Dockerfile: add missing build/runtime dependencies (#7546)
fix(claude-code): Permission routing for smart-approve (#7501)
Add base_path field to custom provider config (#7558)
...
* main: (74 commits)
feat: return structured {stdout, stderr} from shell tool with output schema (#7604)
Improve custom provider creation experience (#7541)
fix(scheduler): schedules added via CLI showing up in UI (#7594)
chore: openai reasoning model cleanup (#7529)
chore(deps): bump hono from 4.12.1 to 4.12.3 in /evals/open-model-gym/mcp-harness (#7585)
chore(deps): bump minimatch from 10.1.1 to 10.2.3 in /evals/open-model-gym/suite (#7498)
chore(deps): bump swiper from 11.2.10 to 12.1.2 in /documentation (#7368)
Better network failure error & antrhopic retry (#7595)
feat: make the text bar persistent and add a queue for messages (#7560)
fix: outdated clippy command in goosehints (#7590)
chore(deps): bump hono from 4.11.7 to 4.12.1 in /evals/open-model-gym/mcp-harness (#7417)
chore(deps-dev): bump ajv from 6.12.6 to 6.14.0 in /ui/desktop (#7437)
chore(deps): bump ajv from 8.17.1 to 8.18.0 in /evals/open-model-gym/mcp-harness (#7491)
chore(deps): bump hono from 4.12.0 to 4.12.2 in /ui/desktop (#7515)
chore(deps-dev): bump rollup from 4.57.1 to 4.59.0 in /ui/desktop (#7522)
chore(deps): bump minimatch in /ui/desktop (#7572)
fix: validate configure probe for streaming providers (#7564)
Dockerfile: add missing build/runtime dependencies (#7546)
fix(claude-code): Permission routing for smart-approve (#7501)
Add base_path field to custom provider config (#7558)
...
* origin/main:
feat: return structured {stdout, stderr} from shell tool with output schema (#7604)
Improve custom provider creation experience (#7541)
fix(scheduler): schedules added via CLI showing up in UI (#7594)
chore: openai reasoning model cleanup (#7529)
chore(deps): bump hono from 4.12.1 to 4.12.3 in /evals/open-model-gym/mcp-harness (#7585)
chore(deps): bump minimatch from 10.1.1 to 10.2.3 in /evals/open-model-gym/suite (#7498)
chore(deps): bump swiper from 11.2.10 to 12.1.2 in /documentation (#7368)
Better network failure error & antrhopic retry (#7595)
feat: make the text bar persistent and add a queue for messages (#7560)
* origin/main: (107 commits) Merge platform/builtin extensions (#7630) Clean up stale references to removed components (#7644) fix: scope empty session reuse to current window to prevent session mixing (#7602) fix: prevent abort in local inference (#7633) Revert git patch for llama-cpp-2 (#7642) docs: update recipe usage step to reflect auto-submit behavior (#7639) docs: add guide for customizing the sidebar (#7638) docs: update Claude Code approve behavior and model list in cli-providers guide (#7448) fix: restore provider and extensions for LRU-evicted sessions (#7616) Restore goosed logging (#7622) feat: return structured {stdout, stderr} from shell tool with output schema (#7604) Improve custom provider creation experience (#7541) fix(scheduler): schedules added via CLI showing up in UI (#7594) chore: openai reasoning model cleanup (#7529) chore(deps): bump hono from 4.12.1 to 4.12.3 in /evals/open-model-gym/mcp-harness (#7585) chore(deps): bump minimatch from 10.1.1 to 10.2.3 in /evals/open-model-gym/suite (#7498) chore(deps): bump swiper from 11.2.10 to 12.1.2 in /documentation (#7368) Better network failure error & antrhopic retry (#7595) feat: make the text bar persistent and add a queue for messages (#7560) fix: outdated clippy command in goosehints (#7590) ... # Conflicts: # Cargo.lock # Cargo.toml # crates/goose-server/src/commands/agent.rs # crates/goose-server/src/main.rs # crates/goose-server/src/routes/reply.rs
Summary
Type of Change
Testing
Unit test and manual testing