Skip to content

Add constructor timeout support#83

Merged
tanyav2 merged 1 commit intotinfoilsh:mainfrom
tanyav2:tanya/constructor-timeout-support
Apr 23, 2026
Merged

Add constructor timeout support#83
tanyav2 merged 1 commit intotinfoilsh:mainfrom
tanyav2:tanya/constructor-timeout-support

Conversation

@tanyav2
Copy link
Copy Markdown
Member

@tanyav2 tanyav2 commented Apr 23, 2026

Summary

  • add constructor-level timeout support to TinfoilAI and AsyncTinfoilAI
  • preserve OpenAI's default timeout behavior by forwarding NOT_GIVEN when callers omit it
  • add isolated unit tests covering sync and async timeout passthrough

Testing

  • uv run pytest tests/test_constructor_timeout.py
  • uv run pytest -m 'not integration'

Notes

  • this fixes the constructor compatibility issue for timeout
  • this PR intentionally does not add base_url passthrough, since the secure client pins transport to the verified enclave endpoint

Summary by cubic

Add constructor timeout support to TinfoilAI and AsyncTinfoilAI. We pass timeout to the underlying openai client, or NOT_GIVEN when omitted, to preserve default timeout behavior.

Written for commit 91aaddc. Summary will update on new commits.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

@tanyav2 tanyav2 merged commit caa642e into tinfoilsh:main Apr 23, 2026
1 of 3 checks passed
@tanyav2 tanyav2 deleted the tanya/constructor-timeout-support branch April 23, 2026 08:11
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.

1 participant