fix(oci): 🐛 restore inline-PEM key normalization dropped during upstream sync [sc-553919] - #108
Merged
miguelangelmorenochacon merged 1 commit intoJun 2, 2026
Conversation
…eam sync [sc-553919] The May 19 upstream-sync merge (PR #106) kept the upstream rename `oci_key` → `oci_key_content` in the `private_key` assignment but dropped the CARTO block (from PR BerriAI#17159) that *defines* `oci_key_content`, leaving an undefined-name reference that breaks every OCI chat completion with `NameError: name 'oci_key_content' is not defined`. - transformation.py: re-apply the normalization block — define `oci_key_content`, replace escaped `\n`/`\r\n` sequences, reject non-string `oci_key` with `OCIError`, and use `OCIError` for the missing-key path (also from PR BerriAI#17159). - carto-features.yml: add an `OCI Inline PEM Key Normalization` entry so the manifest verifier catches it if the block is dropped again on future syncs. Original feature was not tracked, which is why the resolver did not flag the regression. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
miguelangelmorenochacon
marked this pull request as ready for review
June 2, 2026 09:28
3 tasks
3 tasks
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The May 19 upstream-sync merge (PR #106, commit
03c53bc4b3) dropped the CARTO inline-PEM normalization block inlitellm/llms/oci/chat/transformation.pybut kept the upstream renameoci_key→oci_key_contentin theprivate_keyassignment. Net result: every OCI chat completion on this branch fails withNameError: name 'oci_key_content' is not definedat_sign_with_manual_credentials. Production (v1.83.3-carto.1.19.6) is unaffected because it predates the bad merge;ded-29running this build is.Root cause of the CI gap
.github/carto-features.ymlis the manifest consumed bycarto-features-check.ymlto assert that critical CARTO patches survive each sync. The OCI Gemini tool-call feature (PR #68) was listed and the resolver restored it; the OCI inline-PEM feature (PR BerriAI#17159,2905feb889) was not in the manifest, so the verifier had nothing to flag.Changes
litellm/llms/oci/chat/transformation.py— re-apply the dropped block: defineoci_key_content, normalize escaped\n/\r\nsequences, reject non-stringoci_keywithOCIError, and switch the missing-key path from bareExceptiontoOCIError(both behaviors from feat(oci): Enable Oracle Cloud Infrastructure configuration via UI BerriAI/litellm#17159)..github/carto-features.yml— addOCI Inline PEM Key Normalization(source PR 17159) with two verification patterns so future syncs fail loud if this regresses.Validation
tests/litellm/llms/oci/chat/test_oci_chat_transformation.py::TestOCIKeyNormalization— all 4 pass:Manifest verifier locally — all 12 patterns OK (including the 2 new).
Story
sc-553919