Skip to content

Save OpenRouter generation_id in LLM edit history#754

Open
dadukhankevin wants to merge 1 commit intodevfrom
daniel/save-openrouter-generation-id
Open

Save OpenRouter generation_id in LLM edit history#754
dadukhankevin wants to merge 1 commit intodevfrom
daniel/save-openrouter-generation-id

Conversation

@dadukhankevin
Copy link
Copy Markdown
Contributor

Summary

  • callLLM() now returns the OpenRouter generation_id from the API response alongside the completion content
  • The generationId is stored in EditHistory metadata when LLM completions are saved to .codex cells
  • All existing callers updated to handle the new return type

Closes #753

Test plan

  • Trigger an LLM completion on a cell and verify the resulting edit in .codex file metadata contains a generationId field
  • Verify A/B test variant selection still works correctly
  • Verify chat/smart edits still function (they use separate callLLM paths)

🤖 Generated with Claude Code

@dadukhankevin dadukhankevin changed the base branch from main to dev March 22, 2026 20:40
Closes #753

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dadukhankevin dadukhankevin force-pushed the daniel/save-openrouter-generation-id branch from e41ea27 to 650004a Compare March 22, 2026 20:46
@BenjaminScholtens BenjaminScholtens changed the base branch from dev-old to dev March 27, 2026 16:34
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.

LLM completions currently have no connection to the open router call

1 participant