Skip to content

fix(openai): sanitize urls when counting tokens in images#35143

Merged
ccurme (ccurme) merged 7 commits intomasterfrom
cc/oai_image_token_counting
Feb 10, 2026
Merged

fix(openai): sanitize urls when counting tokens in images#35143
ccurme (ccurme) merged 7 commits intomasterfrom
cc/oai_image_token_counting

Conversation

@ccurme
Copy link
Copy Markdown
Collaborator

No description provided.

@github-actions github-actions Bot added integration PR made that is related to a provider partner package integration core `langchain-core` package issues & PRs openai `langchain-openai` package issues & PRs fix For PRs that implement a fix internal labels Feb 10, 2026
Comment thread libs/core/tests/unit_tests/test_ssrf_protection.py Fixed
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Feb 10, 2026

Merging this PR will degrade performance by 15.74%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

❌ 5 regressed benchmarks
✅ 14 untouched benchmarks
⏩ 15 skipped benchmarks1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
WallTime test_import_time[PydanticOutputParser] 541.7 ms 642.9 ms -15.74%
WallTime test_import_time[InMemoryVectorStore] 607.1 ms 679.8 ms -10.69%
WallTime test_import_time[RunnableLambda] 507.5 ms 577.3 ms -12.11%
WallTime test_import_time[ChatPromptTemplate] 635 ms 715.8 ms -11.29%
WallTime test_import_time[LangChainTracer] 446.7 ms 507.8 ms -12.03%

Comparing cc/oai_image_token_counting (2b928cd) with master (0493b27)

Open in CodSpeed

Footnotes

  1. 15 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@ccurme ccurme (ccurme) merged commit 2b4b1dc into master Feb 10, 2026
127 of 128 checks passed
@ccurme ccurme (ccurme) deleted the cc/oai_image_token_counting branch February 10, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core `langchain-core` package issues & PRs fix For PRs that implement a fix integration PR made that is related to a provider partner package integration internal openai `langchain-openai` package issues & PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants