Skip to content

rebrand: standalone Prem Agent Gateway (patches + rebrand -> main) - #1

Open
athena-git-bot[bot] wants to merge 9 commits into
mainfrom
fix/responses-cache-write-tokens-null
Open

rebrand: standalone Prem Agent Gateway (patches + rebrand -> main)#1
athena-git-bot[bot] wants to merge 9 commits into
mainfrom
fix/responses-cache-write-tokens-null

Conversation

@athena-git-bot

Copy link
Copy Markdown

Promotes our working branch to main, making this the standalone Prem Agent Gateway repo.

Included:

  • The 4 runtime patches already in production (Responses replayed-assistant-messages, RequestType dyn-compat, Bedrock namespace tools for Codex >=0.149, GHCR image CI)
  • Rebrand: Prem-specific README / CONTRIBUTION / SECURITY; removed upstream CHARTER, CODEOWNERS, CODE_OF_CONDUCT. Apache-2.0 license and upstream attribution retained.
  • Image CI retargeted to push on main (was the feature branch)

Follow-ups after merge (already prepared):

  • agent-marketplace PR switching the Flux GitRepository branch to main
  • Detach the fork network in repo settings

🤖 Generated with Claude Code

charitra-prem and others added 8 commits August 23, 2026 20:33
Codex CLI's Responses SSE parser declares input_tokens_details.cache_write_tokens
as i64 with #[serde(default)], which accepts a missing field but rejects an
explicit null. The Bedrock -> Responses conversion emitted null whenever Bedrock
reported no cache writes, so every streamed turn failed with
'failed to parse ResponseCompleted: invalid type: null, expected i64'.
Emit 0 instead, matching how cached_tokens is handled.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The Bedrock -> Responses streaming conversion emitted the final message item
(and content_part.done) with empty content, even though text deltas had been
streamed. Clients that build the assistant message from output_item.done
rather than from deltas (e.g. Codex CLI) saw an empty assistant message.
Accumulate the streamed text and fold it into the final message item.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Agent clients (e.g. Codex CLI) replay prior assistant turns as
{type:message, role:assistant, content:[{type:output_text, text}]} without the
server-assigned id/status or the annotations array. The typed OutputMessage
requires those, so multi-step turns failed with
'data did not match any variant of untagged enum InputParam'.
Add a RequestType::normalize_json hook and fill in the missing fields for
Responses requests before deserialization.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Newer Codex CLI sends MCP servers as a single Namespace tool
(NamespaceToolParam) instead of individual function tools. The Bedrock
conversion dropped the unsupported type with a warning, so models behind
the gateway saw no MCP tools at all.

- request: flatten each namespace into per-tool Bedrock specs named
  '<ns>::<tool>' via the existing BedrockToolNameMap sanitization
- response (streaming + non-streaming): split restored names back and
  emit FunctionToolCall items carrying the namespace field
- input replay: recombine namespace+name for assistant tool-call history

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replace upstream README/governance files with Prem-specific ones, retarget
image CI to main, keep Apache-2.0 license and upstream attribution.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…nd output_item.done fixes

Co-Authored-By: Claude Fable 5 <noreply@anthropic.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