Skip to content

Conversation

@jwiegley
Copy link
Contributor

Summary

  • Fixes memory-report does not like gptel's hash data #1032 where memory-report fails when trying to compute the size of gptel's transient history
  • Prevents storing backend structs (which contain bytecode) in transient's history
  • Adds test to verify the fix works correctly

Problem

When memory-report tries to traverse the gptel-gemini struct stored in transient-history, it encounters an out-of-bounds error when accessing the struct's slots. This happens because the struct contains a compiled function (bytecode) in its :url slot, which memory-report doesn't handle correctly.

Solution

The fix adds history-key and history-default slots (both set to nil) to the gptel-provider-variable class. This prevents transient from storing the backend struct in its history, avoiding the memory-report error while maintaining full functionality of the transient menu.

Test plan

  • Added test file gptel-transient-memory-test.el to verify the fix
  • Verified that gptel-menu still works correctly
  • Confirmed that backend switching and model selection still function properly

🤖 Generated with Claude Code

…k#1032)

When memory-report tries to compute the size of gptel's transient
history data, it fails with an out-of-bounds error when accessing
slots of the gptel-gemini struct. This happens because the struct
contains a bytecode function in its :url slot.

The fix prevents storing the backend struct in transient's history
by setting history-key and history-default to nil in the
gptel-provider-variable class. This avoids the memory-report error
while maintaining full functionality of the transient menu.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
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.

memory-report does not like gptel's hash data

1 participant