Skip to content

Conversation

@mathetake
Copy link
Member

@mathetake mathetake commented Nov 7, 2025

Description
The translators shouldn't have to be tied with ext_proc APIs since it's none of their concerns. This commit decouples the translator package from them so that we can easily use them in dynamic modules too.

Related Issues/PRs (if applicable)

Preparation for #90

@mathetake
Copy link
Member Author

won't merge until v0.4

Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>

# Conflicts:
#	internal/extproc/translator/openai_gcpvertexai_test.go
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
@codecov-commenter
Copy link

codecov-commenter commented Nov 8, 2025

Codecov Report

❌ Patch coverage is 94.97487% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.00%. Comparing base (05acc5f) to head (daeb4f3).

Files with missing lines Patch % Lines
...ernal/extproc/translator/anthropic_awsanthropic.go 33.33% 6 Missing ⚠️
internal/extproc/translator/openai_awsbedrock.go 95.65% 0 Missing and 1 partial ⚠️
internal/extproc/translator/openai_azureopenai.go 50.00% 1 Missing ⚠️
internal/extproc/translator/openai_gcpanthropic.go 91.66% 1 Missing ⚠️
internal/extproc/translator/openai_openai.go 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1507      +/-   ##
==========================================
- Coverage   84.15%   84.00%   -0.15%     
==========================================
  Files         150      149       -1     
  Lines       12968    12837     -131     
==========================================
- Hits        10913    10784     -129     
+ Misses       1434     1432       -2     
  Partials      621      621              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
# Conflicts:
#	internal/extproc/translator/imagegeneration_openai_openai_test.go
#	internal/extproc/translator/openai_gcpvertexai.go
@mathetake mathetake marked this pull request as ready for review November 12, 2025 13:46
@mathetake mathetake requested a review from a team as a code owner November 12, 2025 13:46
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Nov 12, 2025
@mathetake
Copy link
Member Author

Sorry bad merge

Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
}
}
],
]
Copy link
Contributor

Choose a reason for hiding this comment

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

really sorry, the gcpToolCallsChunk should have "\n\n" between the chunks, otherwise the test does not make sense. I put it in #1537. Sorry for this mistake!

Copy link
Member Author

Choose a reason for hiding this comment

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

don't be sorry! let's make sure all tests are working properly carefully from next time :)

nacx added a commit that referenced this pull request Nov 13, 2025
**Description**
As @mathetake pointed out, the test function in
#1524 is quite wrong.
@mathetake fixed some in
#1507, but there is still
one bug: I did not insert "\n\n" in the string `gcpToolCallsChunk`,
thus, it just parsed out one gcp chunk, which makes the test meaningless
(it's to test across chunks).

Really sorry for the mistake in the tests!

---------

Signed-off-by: yxia216 <yxia216@bloomberg.net>
Co-authored-by: Ignasi Barrera <ignasi@tetrate.io>
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Nov 13, 2025
@mathetake mathetake enabled auto-merge (squash) November 13, 2025 16:06
@mathetake
Copy link
Member Author

/retest

@mathetake mathetake merged commit 3898b06 into main Nov 13, 2025
49 of 51 checks passed
@mathetake mathetake deleted the decoupletranslator branch November 13, 2025 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants