fix: declare long-context Claude and GPT metadata - #223
Open
dgokeeffe wants to merge 2 commits into
Open
Conversation
This was referenced Jul 18, 2026
dgokeeffe
force-pushed
the
fix/1m-context-claude-gpt-pi
branch
from
July 24, 2026 07:08
a6359d3 to
9e6b87d
Compare
rohita5l
reviewed
Jul 25, 2026
rohita5l
reviewed
Jul 25, 2026
dgokeeffe
force-pushed
the
fix/1m-context-claude-gpt-pi
branch
from
July 26, 2026 00:38
9e6b87d to
f2fbb83
Compare
Author
|
@rohita5l I refreshed this stacked PR: Claude capability/version policy is now shared by Pi and Claude Code, the Sonnet 4.5 Claude Code behavior is explicit in the description, and both threads have detailed replies and are resolved. Could you re-review and approve the fork CI run when convenient? |
Expose the GLM and Kimi coding-model cohort through Pi and OpenCode with shared token limits and reasoning metadata. Keep unsupported chat models out of discovery, including Inkling until gateway issue databricks#215 is fixed, and retain the GPT-OSS Responses API routing guard.
Centralize Claude family/version parsing so Pi metadata, adaptive-thinking compatibility, and Claude Code's [1m] selector cannot drift. Cover Sonnet 4.5, Opus 4.6, future major versions, Fable fallback, and prefixed model IDs.
dgokeeffe
force-pushed
the
fix/1m-context-claude-gpt-pi
branch
from
July 26, 2026 04:38
f2fbb83 to
636c3b6
Compare
Author
|
Post-review update: shared capability policy now reflects Sonnet 4.6 at 1M/64k and Fable 5 at native 1M/128k with adaptive thinking but no |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes long-context metadata for Claude and GPT gateway models and centralizes Claude capability policy across agents.
Closes #222.
Changes
contextWindow,maxTokens, reasoning, image, and adaptive-thinking metadata instead of accepting Pi's 128k/4k custom-model defaults.databricks.py.[1m]selector consume the same capability result.system.ai.*,databricks-*, provider-qualified,[1m]-suffixed, and future major-version IDs.[1m]suffix.Claude Code behavior
This PR intentionally changes Claude Code, not only Pi: Sonnet 4.5+ receives the
[1m]suffix, while Opus receives it from 4.6 onward. Sonnet 4.5 has the 1M beta window with a 64k output cap. The PR description calls this out explicitly so the Claude agent behavior is reviewed as part of the change.Review follow-up
The duplicated version policy previously split between
agents/claude.pyanddatabricks.pyhas been removed. Table-driven coverage now checks Opus 4.5/4.6/5, Sonnet 4.4/4.5/4.6/5, Haiku, Fable, malformed IDs, prefixes, and existing[1m]suffixes.Validation
uv run pytest tests/test_databricks.py tests/test_agent_claude.py tests/test_agent_pi.py -q— passed in the final review loopuv run ruff check src/ucode/databricks.py src/ucode/agents/claude.py src/ucode/agents/pi.py tests/test_databricks.py tests/test_agent_claude.py tests/test_agent_pi.pyStacking / review scope
This PR is stacked on #217. Review the incremental commit/diff from
65b4609to636c3b6:65b4609...636c3b6
After #217 merges, this branch can be rebased directly onto
main.