Skip to content

fix(catalog): default openai to gpt-5.5 (matches bundle's extended_thinking=true)#20

Merged
manojp99 merged 1 commit into
mainfrom
fix/bundle-extended-thinking-default
May 28, 2026
Merged

fix(catalog): default openai to gpt-5.5 (matches bundle's extended_thinking=true)#20
manojp99 merged 1 commit into
mainfrom
fix/bundle-extended-thinking-default

Conversation

@manojp99

@manojp99 manojp99 commented May 28, 2026

Copy link
Copy Markdown
Collaborator

Why

amplifier-agent ships with a self-contradiction in its own defaults:

Layer File Decision
Bundle src/amplifier_agent_lib/bundle/bundle.md:26 extended_thinking: true on every turn
Catalog src/amplifier_agent_cli/provider_sources.py:63 openaidefault_model: "gpt-4o"
Orchestrator amplifier-module-loop-streaming:423-424 Forwards extended_thinking as a provider kwarg verbatim
Provider amplifier-module-provider-openai:1243-1252 Stamps reasoning.effort: "high" on any request carrying extended_thinking=True, with zero model-capability gate

Result with a fresh amplifier-agent run --provider openai:

RuntimeError: Execution failed: InvalidRequestError:
  "Unsupported parameter: 'reasoning.effort' is not supported with this model."

OpenAI 400 on every turn out of the box. The bundle asks for reasoning, the catalog picks a non-reasoning model.

Fix

Switch the catalog's OpenAI default_model from gpt-4o (non-reasoning) to gpt-5.5 (reasoning-capable). amplifier-agent's defaults are now internally consistent — the bundle requests extended_thinking, the catalog ships a model that supports the resulting reasoning.effort parameter.

The fix is one line in src/amplifier_agent_cli/provider_sources.py:63, plus an inline comment explaining why this specific model was chosen.

Why gpt-5.5 specifically

  • It accepts the reasoning.effort parameter the bundle's extended_thinking: true ultimately triggers
  • It's available across the standard tiers we've verified (/v1/models listing confirms presence on enterprise keys)
  • The existing provider has explicit per-effort validation for the gpt-5.5 family (see amplifier-module-provider-openai:118-148 for gpt-5.5-pro validator), so behavior is known and tested
  • Cheaper than gpt-5.5-pro for the common case while still reasoning-capable

Consumers who want a different OpenAI model can override via bundle config — this is a default, not a constraint.

What this is NOT

This is not the architecturally correct long-term fix. That belongs in amplifier-module-provider-openai:1243-1252 — gate the extended_thinking → reasoning.effort injection on _model_may_reason(model_name), mirroring the discipline already present at lines 1239-1242. That fix closes the bug for every consumer (amplifier-agent, amplifier-app-cli, openclaw, anything else using the provider) regardless of which model they default to. It will be filed against that repo as a separate PR.

This PR is the immediate-unblock so amplifier-agent users get a working OpenAI default now, without waiting for the provider fix to merge + propagate.

What needs to rebuild downstream

Component Action
amplifier-agent-ts (wrapper) none — catalog content isn't a wire contract
Protocol version unchanged (0.2.0)
pyproject.toml engine version not bumped — forward-fix on engine-v0.3.0; the tag will be moved to this merge commit
Bundle (bundle.md) unchanged
bundle.version unchanged (1.2.1) — no bundle behavior change, so no cache invalidation needed
nanoclaw Dockerfile AMPLIFIER_AGENT_REF unchanged (engine-v0.3.0); image rebuild picks up the moved tag's new SHA
Other consumers (amplifier-app-cli, openclaw) unaffected — their own catalogs ship the same defect; they get the principled fix when the provider gate lands

Verification

Build + manual amplifier-agent run --provider openai -y "hi" in the rebuilt nanoclaw container will exercise the new default. Expected: bundle sends extended_thinking=true, provider injects reasoning.effort: "high", OpenAI accepts the request against gpt-5.5, model returns a reply.

…inking=true)

The bundle defaults extended_thinking: true on every turn, which triggers the
provider to inject reasoning.effort: 'high' on the OpenAI request. The old
catalog default (gpt-4o) doesn't support reasoning, causing an OpenAI 400 error
immediately on every chat turn.

This fix aligns the catalog's model selection with the bundle's expectations:
gpt-5.5 is reasoning-capable and matches the extended_thinking parameter the
bundle requests. Consumers can override via bundle config if needed.

Note: The architecturally correct long-term fix belongs in the OpenAI provider
(gate the extended_thinking → reasoning.effort injection on model capability).
This PR is the immediate unblock for amplifier-agent users while that fix
propagates.

Generated with [Amplifier](https://github.com/microsoft/amplifier)

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
@manojp99 manojp99 force-pushed the fix/bundle-extended-thinking-default branch from 3fe1fb4 to e738c74 Compare May 28, 2026 04:21
@manojp99 manojp99 changed the title fix(bundle): default extended_thinking to false (was triggering OpenAI 400 with gpt-4o catalog default) fix(catalog): default openai to gpt-5.5 (matches bundle's extended_thinking=true) May 28, 2026
@manojp99 manojp99 merged commit 2bd951f into main May 28, 2026
2 of 3 checks passed
manojp99 pushed a commit to manojp99/amplifier-app-nanoclaw that referenced this pull request May 28, 2026
…3.0 (protocol 0.2.0)

Adopt the engine + wrapper coordinated fix from amplifier-agent PR #17
(protocol 0.2.0, path-based MCP config delivery) and the catalog fix from
PR #20 (openai default_model gpt-5.5 to match the bundle's
extended_thinking=true default).

Engine pin: AMPLIFIER_AGENT_REF=engine-v0.3.0 in container/Dockerfile.
The tag was moved to PR #20's merge commit so a rebuild pulls the catalog
fix without needing a separate engine version bump. Layer-cache busting
during rebuild required --no-cache (or BuildKit --no-cache-filter).
A persistent CACHEBUST arg for the Dockerfile is a separate follow-up.

Wrapper bump: amplifier-agent-ts 0.3.1 -> 0.4.0 (published with provenance
via OIDC trusted publishing on the wrapper-v0.4.0 tag).

Host + agent-runner code: drops the workarounds we'd been carrying for
the engine's MCP plumbing bugs. The engine now handles --mcp-config-path
end-to-end (validates the path, sets AMPLIFIER_MCP_CONFIG, lets the
tool-mcp module discover via its documented config priority). The
host-side bridge no longer needs to compensate.

Verified end-to-end inside the rebuilt container:
- amplifier-agent run --provider openai -y "..." returns a real reply
  through gpt-5.5 with extended_thinking=true flowing cleanly through
  loop-streaming -> provider-openai -> OpenAI API.
- Engine envelope parseable on stdout, protocolVersion=0.2.0,
  metadata block present.

Refs:
- microsoft/amplifier-agent#17 (engine + wrapper Path D)
- microsoft/amplifier-agent#18 (smoke test fix)
- microsoft/amplifier-agent#19 (vitest timeout fix)
- microsoft/amplifier-agent#20 (catalog gpt-5.5 default)
- engine tag: engine-v0.3.0 -> commit 2bd951f
- wrapper tag: wrapper-v0.4.0 -> commit 53f99bb

Generated with [Amplifier](https://github.com/microsoft/amplifier)

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
manojp99 added a commit that referenced this pull request May 28, 2026
… wrappers (#21)

* docs(readme): align with Mode A pivot, protocol 0.2.0, and shipped L3 wrappers

This README was significantly out of date with recent changes:

- PR #8 (Mode A pivot): Replaced stdio JSON-RPC wire protocol with subprocess driver
  model (argv in / JSON envelope out). README still documented Mode B (--stdio flag,
  agent/initialize JSON-RPC methods) as primary interface.

- PR #17: Bumped protocol version 0.1.0 → 0.2.0, changed --mcp-servers (inline JSON)
  to --mcp-config-path (file path) for MCP config delivery. Neither reflected in README.

- PR #20: Changed OpenAI default from gpt-4 to gpt-5.5 (matches extended_thinking=true
  in bundle). README used outdated default.

- PR #7: TypeScript wrapper shipped at 0.4.0 on npm, Python wrapper shipped in
  wrappers/python/. README claimed L3 wrappers were 'designed, implementation next'.

Applied 10 targeted corrections across README:
1. 'What it is' section — removed Mode B bullet, fixed lifecycle
2. 'Why' section — removed JSON-RPC-mirrors-MCP claim
3. 'Quick start' — removed --stdio example, pointed at wrapper SDKs
4. 'Modes' table — collapsed to Mode A only, added historical design-doc note
5. 'Admin commands' — added missing 'prepare' and 'verify' commands
6. 'Approval flow' — removed unimplemented 'c' response, removed stdio paragraph
7. 'Embedding in Python' — replaced broken classmethod example with correct constructor
   and instance method usage
8. 'Architecture diagram' — updated arrow label to reflect Mode A transport
9. 'Wire protocol' section — replaced Mode B docs with Mode A (0.2.0 argv flags, JSON
   envelope schema, stdout/stderr split)
10. 'Status' — updated from 'Phase 1, L3 next' to shipped state (0.3.0 engine, 0.4.0 TS
    wrapper, Python wrapper, 0.2.0 protocol, conformance suite, path-based MCP) with next
    steps (L2 host adapters, container packaging).

Generated with [Amplifier](https://github.com/microsoft/amplifier)

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>

* docs(readme): add TypeScript SDK section and fix git+URL install command

- Added "TypeScript / Node.js SDK" section documenting the shipped npm package
  (amplifier-agent-ts@0.4.0) with install command, quick-start example, Node ≥ 20
  requirement, and pointers to full README and type definitions.

- Fixed broken Python install commands: replaced bare PyPI references
  (uv tool install / pipx install) with git+URL form pinned to engine-v0.3.0.
  Package is not yet published to PyPI; this fixes the broken install path
  demonstrated by user feedback. Added explanatory note about separate engine
  vs wrapper version tagging (engine-v0.3.0 vs wrapper-v0.4.0).

Both gaps were identified during PR #21 review: TypeScript SDK was effectively
undocumented for consumers despite npm publication, and Python install was
impossible without the git+URL form.

Generated with [Amplifier](https://github.com/microsoft/amplifier)

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>

* docs(readme): replace registry install with from-source instructions

The Python engine hasn't been published to any registry. Removed all
registry-style install commands (uv tool install amplifier-agent, pipx
install amplifier-agent, and git+URL forms with PEP 508 specs) as they
were misleading. From-source install via git clone + uv tool install -e .
is now the only documented path.

Added note that engine and wrapper releases are tagged separately
(engine-v0.3.0 vs wrapper-v0.4.0) so users can git checkout <tag> before
installing if they want a pinned version.

This does not affect the TypeScript section — amplifier-agent-ts is
published to npm and npm install amplifier-agent-ts is correct.

🤖 Generated with [Amplifier](https://github.com/microsoft/amplifier)

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>

* docs(readme): use uv tool install with bare git+URL (no registry needed)

uv tool install works fine with a raw git+https://... argument; no PEP 508
name @ url wrapper, no registry, no separate clone+sync step. Pinning
supported via @<tag>. From-source editable install retained as a
contributor note.

Generated with [Amplifier](https://github.com/microsoft/amplifier)

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>

---------

Co-authored-by: Manoj Prabhakar Paidiparthy <mpaidiparthy@microsoft.com>
Co-authored-by: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant