Skip to content

fix(fused-ffi): complete ABI v9 context_size + bump stale sizeof assert (80→88)#30

Open
lalalune wants to merge 1 commit into
codex/eliza-parent-bcae29e65from
eliza/fused-abi-v9-context-size
Open

fix(fused-ffi): complete ABI v9 context_size + bump stale sizeof assert (80→88)#30
lalalune wants to merge 1 commit into
codex/eliza-parent-bcae29e65from
eliza/fused-abi-v9-context-size

Conversation

@lalalune

Copy link
Copy Markdown
Member

The streaming-LLM config struct eliza_llm_stream_config_t gained context_size (int32 @ offset 80) for ABI v9 — eliza_inference_llm_stream_open now honors cfg->context_size (>0) instead of only the ELIZA_LLM_N_CTX env default. The TS marshaller (ffi-bindings.ts) was already emitting 88 bytes with context_size at offset 80, but the C-side ABI-guard static_assert(sizeof(...) == 80) was never bumped — so the fused elizainference target fails to compile. This bumps it to 88 to match the real layout.

Validated: a host Metal build of libelizainference (ABI v12) loads + generates on the real google/gemma-4-E2B with context_size=4096 honored — "The capital of France is Paris.", 83 tok/s on an Apple M4 Max.

🤖 Generated with Claude Code

…rt (80→88)

The streaming-LLM config struct gained `context_size` (int32 @ offset 80) for
ABI v9 — `_llm_stream_open` now honors `cfg->context_size` (>0) instead of only
the ELIZA_LLM_N_CTX env default. The TS marshaller (ffi-bindings.ts) was already
emitting 88 bytes with context_size at offset 80, but the C-side ABI-guard
`static_assert(sizeof(eliza_llm_stream_config_t) == 80)` was never bumped, so the
fused `elizainference` target failed to compile. Bump it to 88 to match the real
layout (8×int32 + 5×ptr, pointer-aligned).

Validated: a host Metal build of `libelizainference` (ABI v12) loads + generates
on the real google/gemma-4-E2B with context_size=4096 honored (83 tok/s, M4 Max).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 874470c0-1d81-451d-8ef9-9d7d2e90a7b6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch eliza/fused-abi-v9-context-size

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant