Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/harness/harness_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ func TestPiFirstPartyRoutesUseNativeAPIs(t *testing.T) {
}
require.Equal(t, "anthropic-messages", models["acme/primary"]["api"])
require.Equal(t, testEndpoint, models["acme/primary"]["baseUrl"], "Pi's Anthropic client appends /v1")
require.NotContains(t, models["acme/primary"], "compat")
require.Equal(t, true, get(models["acme/primary"], []string{"compat", "forceAdaptiveThinking"}).Data)
require.Equal(t, "openai-responses", models["acme/background"]["api"])
require.NotContains(t, models["acme/background"], "baseUrl")
require.NotContains(t, models["acme/background"], "compat")
Expand Down
2 changes: 2 additions & 0 deletions internal/harness/pi.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ func piModel(r Route, baseURL string) map[string]any {
case ProviderAnthropic:
// Pi's Anthropic client appends /v1/messages itself.
model["api"], model["baseUrl"] = "anthropic-messages", baseURL
// Anthropic Messages models use adaptive thinking, not a token budget.
model["compat"] = map[string]any{"forceAdaptiveThinking": true}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't verified this claim, but @ShivainVij I wonder if this is true? It's up to us whether we want to have some hardcoded list in the CLI, but it does seem like we would break any old model usage

image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is true, old models would break. Is support for 4.5 models needed still?

@nnarayen nnarayen Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is true, old models would break. Is support for 4.5 models needed still?

Nobody has explicitly told us that they need older models + Pi, but I doubt that's something that would organically come up. Though it's unlikely, would be a bummer if this broke for somebody. It seems relatively easy to fix with low risk, but I'll defer to you

case ProviderOpenAI:
model["api"] = "openai-responses"
default:
Expand Down
Loading