[codex] fix media skill profile auth and run events (#965)

* fix media skill profile auth and run events

* test bridge run profile context
This commit is contained in:
ekko
2026-05-24 12:52:14 +08:00
committed by GitHub
parent 3e8f84aa65
commit 634a622934
20 changed files with 368 additions and 97 deletions
@@ -169,10 +169,12 @@ describe('bridge run final context usage', () => {
{ role: 'user', content: 'hello' },
{ role: 'assistant', content: 'done' },
],
'system prompt',
expect.stringContaining('[Current Hermes profile: default]'),
'default',
{ model: 'gpt-test', provider: 'openai' },
)
expect(bridge.contextEstimate.mock.calls[0][2]).toContain('system prompt')
expect(bridge.contextEstimate.mock.calls[0][2]).toContain('X-Hermes-Profile')
expect(state.contextTokens).toBe(12345)
expect(emit).toHaveBeenCalledWith('usage.updated', expect.objectContaining({
inputTokens: 11,