Skip to content

fix(proxy-responses): tolerate structured content type values - #1566

Merged
Soju06 merged 3 commits into
Soju06:mainfrom
Komzpa:fix/pr1565-dict-type-cache-guard-20260802
Aug 4, 2026
Merged

fix(proxy-responses): tolerate structured content type values#1566
Soju06 merged 3 commits into
Soju06:mainfrom
Komzpa:fix/pr1565-dict-type-cache-guard-20260802

Conversation

@Komzpa

@Komzpa Komzpa commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • guard explicit prompt-cache content-type checks so structured type values do not raise TypeError
  • keep prompt-cache breakpoint stripping limited to known string content types
  • add regression coverage through the API-key usage estimation path

Context

This is a follow-up guard for #1565. That PR strips subscription-incompatible explicit prompt-cache controls, but the recursive walker assumed every type value was hashable. Some Codex client payloads can carry structured content metadata, so the membership check must first confirm that type is a string.

Test

  • uv run pytest -q tests/unit/test_proxy_api_key_usage.py

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@Soju06
Soju06 merged commit 8600a60 into Soju06:main Aug 4, 2026
31 checks passed
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.

2 participants