Skip to content
Merged
Show file tree
Hide file tree
Changes from 104 commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
29bb0f0
fix(opentelemetry): JSON-serialize dict metadata fields for OTEL span…
Anai-Guo May 8, 2026
28e6a91
feat(dashscope): add embeddings and reranks(qwen3-rerank) support via…
yimao May 13, 2026
f524b10
fix(vertex_ai/gemini): raise BadRequestError when image_url or url fi…
krisxia0506 May 13, 2026
b3de50d
fix(vertex_ai): raise error on mid-stream 429/error chunks instead of…
krisxia0506 May 13, 2026
1ba02c0
fix: raise BadRequestError for file content blocks missing 'file' sub…
krisxia0506 May 13, 2026
918de75
Fix Gemini MIME detection for extensionless GCS URIs (#27278)
krisxia0506 May 13, 2026
62ea380
fix(vertex_ai/partner_models): drop unused vertexai SDK gate from cou…
voidborne-d May 17, 2026
4d3a4fa
feat(chart): add support for autoscaling behavior in HPA (#27990)
FabrizioCafolla May 15, 2026
c6c2c39
feat(proxy): add blocked flag to models for pause/resume from the UI …
Cyberfilo May 15, 2026
67af5e0
fix: pass socket timeouts to Redis cluster clients (#27920)
tomdee May 15, 2026
3668584
Fix/cache token (#28009)
escon1004 May 16, 2026
e73bbb5
fix(deepseek): forward reasoning_content in multi-turn thinking mode …
Divyansh8321 May 16, 2026
99f2487
fix(guardrails): return HTTP 400 instead of 500 for blocked requests …
robin-fiddler May 13, 2026
683b421
fix(router/proxy): address Greptile P1+P2 review comments on PR #28161
Sameerlite May 18, 2026
9de0fce
fix: address bug detection findings (cache token order, mutable defau…
cursoragent May 18, 2026
d89de67
fix: address bugs in async pass-through, anthropic cache token detect…
cursoragent May 18, 2026
e545280
fix code qa
Sameerlite May 18, 2026
d5f3224
fix(vertex_ai/gemini): strip MIME parameters from GCS contentType
cursoragent May 18, 2026
d9672eb
fix(vertex_ai/gemini): clarify mime-type error message string concate…
cursoragent May 18, 2026
0647074
feat(oci): add embeddings, fix streaming/reasoning, expand model catalog
fede-kamel Apr 5, 2026
dcfdaa4
fix(oci): remove dead OCI elif branch in utils.py, align async split_…
fede-kamel Apr 5, 2026
e894b44
test(oci): add unit tests for split_chunks fix and no-duplicate-OCI-b…
fede-kamel Apr 5, 2026
30ecbf1
fix(oci): address remaining bugs from issue #25082 — streaming signed…
fede-kamel Apr 5, 2026
91be3a8
fix(oci): comprehensive code quality pass — bugs, tests, schema accuracy
fede-kamel Apr 5, 2026
836d7e6
test(oci): move integration tests to tests/llm_translation/
fede-kamel Apr 5, 2026
2b055ed
fix(oci): align types and transformation with official OCI SDK
fede-kamel Apr 5, 2026
68b4b69
fix(oci): use 'output' key in Cohere tool result outputs (matches ref…
fede-kamel Apr 5, 2026
9bb707a
fix(oci): port schema/type utilities from langchain-oracle reference …
fede-kamel Apr 5, 2026
eb184a5
refactor(oci): split transformation.py into cohere.py and generic.py
fede-kamel Apr 5, 2026
17d52c2
refactor(oci): principal-level code quality pass
fede-kamel Apr 5, 2026
3262d3f
fix(oci): address PR review findings
fede-kamel Apr 7, 2026
345a9d3
test(oci): add unit tests to improve patch coverage
fede-kamel Apr 7, 2026
3078b53
fix(oci): rename supports_streaming to supports_native_streaming in m…
fede-kamel Apr 7, 2026
7a4e8ec
test(oci): add 67 tests targeting uncovered happy paths for coverage
fede-kamel Apr 7, 2026
e34de1e
fix(oci): suppress CodeQL false positive on sha256_base64 (OCI HTTP s…
fede-kamel Apr 7, 2026
98d12cb
fix(oci): remove 6 duplicate model price entries and reconcile confli…
fede-kamel Apr 7, 2026
c04cf12
fix(oci): route GPT-5 family to maxCompletionTokens
fede-kamel May 6, 2026
9f3f10c
ci(oci): fix CI failures — black formatting + recursive_detector ignore
fede-kamel May 6, 2026
742635d
fix(oci): silence MyPy errors in cohere.py — typed-dict access
fede-kamel May 6, 2026
a09f629
fix(oci): silence CodeQL py/weak-sensitive-data-hashing on sha256_base64
fede-kamel May 6, 2026
05cb73c
feat(oci): add reasoning_effort passthrough — only true missing primi…
fede-kamel May 6, 2026
4ce4af4
feat(oci): reasoning_effort + reasoning_tokens for OCI GenAI
fede-kamel May 14, 2026
2ea7ae7
fix(codeql): re-scope py/weak-sensitive-data-hashing exclusion to OCI…
fede-kamel May 14, 2026
ab1b9b1
fix(oci): drop duplicate text on Cohere streaming terminal chunk
fede-kamel May 17, 2026
02c1a3d
fix(oci): buffer SSE stream across HTTP read boundaries
fede-kamel May 18, 2026
5d65fdb
test(oci): repoint TestOCIKeyNormalization to sign_with_manual_creden…
fede-kamel May 18, 2026
0ace1c4
fix(oci): validate oci_region before URL interpolation to prevent SSRF
mateo-berri May 19, 2026
1f064a7
Merge branch 'litellm_internal_staging' into litellm_oci_genai_ci
mateo-berri May 19, 2026
be7ca9a
test(audio): skip when gpt-4o-audio-preview is unavailable upstream
mateo-berri May 19, 2026
1a9e036
fix(oci/router): catalog-driven maxCompletionTokens; generic blocked-…
mateo-berri May 19, 2026
b59dc01
fix(oci/cohere): guard handle_cohere_response against missing usage
mateo-berri May 19, 2026
14be80d
fix(oci): address bug review findings in chat transformation
cursoragent May 19, 2026
167a629
fix(oci/cohere): emit tool calls in streaming and null content when t…
mateo-berri May 19, 2026
d2701fc
fix(oci): preserve tool results, embed URL path, and generic finish r…
cursoragent May 19, 2026
36a8485
fix(oci/generic): silence mypy assignment error on dynamic finish_reason
mateo-berri May 19, 2026
1f217af
fix(oci/embed): always set usage on embedding response
cursoragent May 19, 2026
f9128b7
fix(oci/chat): append /20231130/actions/chat to explicit api_base
mateo-berri May 19, 2026
bf13356
fix(oci/cohere): mark logprobs/logit_bias unsupported and normalize u…
cursoragent May 19, 2026
49ba871
fix(oci/cohere): preserve trailing tool result in chatHistory
mateo-berri May 19, 2026
50fe900
fix(main): remove dead OCI embedding elif block
mateo-berri May 19, 2026
e4b6c56
test(oci): move integration tests out of llm_translation mock-only fo…
mateo-berri May 19, 2026
b295514
fix(oci/cohere): suppress tool calls on stream terminal consolidation…
cursoragent May 19, 2026
489f7c1
fix(oci,httpx): normalize finish_reason, preserve response_format, fi…
cursoragent May 19, 2026
878df5b
fix(oci): clean up OCIChatConfig init, normalize generic stream finis…
cursoragent May 19, 2026
212b30e
fix(oci): strip trailing action path in get_oci_base_url to avoid URL…
mateo-berri May 19, 2026
a7eac2d
fix(httpx): preserve sync embed data= kwarg to avoid breaking mock-ba…
mateo-berri May 19, 2026
d3821f2
Merge branch 'litellm_internal_staging' into litellm_oci_genai_ci
mateo-berri May 21, 2026
802a5f8
fix(oci): stable tool-call ids across stream chunks; lenient Cohere f…
cursoragent May 21, 2026
032381a
fix(oci/embed): validate OCI credentials in validate_environment
cursoragent May 21, 2026
1e45b63
test(oci/embed): expect OCIError from validate_environment when crede…
mateo-berri May 21, 2026
1c6cd61
fix(oci): polish stream chunk handling and signed body default
cursoragent May 21, 2026
e3ee32e
fix(oci/chat): catch pydantic ValidationError when parsing OCI responses
mateo-berri May 21, 2026
09c0537
fix(oci/catalog): real prices for Llama 4, drop zero-cost OCI OpenAI …
mateo-berri May 21, 2026
48418f5
fix(oci/chat): wrap CohereChatResult construction in try/except
mateo-berri May 21, 2026
61b99a0
fix(oci): harden Cohere stream/finish-reason and dedupe maxTokens par…
cursoragent May 21, 2026
9e80222
fix(oci): emit content=None instead of empty string for text-free gen…
cursoragent May 21, 2026
f5993d9
test(oci): expect content=None for text-free generic stream chunks
mateo-berri May 21, 2026
af7e879
codeql: narrow OCI sha256 suppression to query-filter, not whole file
cursoragent May 21, 2026
db79516
fix(oci): use locale-independent RFC 7231 date for manual signing
mateo-berri May 21, 2026
5f28d90
fix(oci): strip 'oci/' prefix in get_vendor_from_model
cursoragent May 21, 2026
557a553
codeql: scope OCI sha256 suppression to common_utils.py via filter-sarif
mateo-berri May 21, 2026
9321925
Fix OCI chat bugs: tool_calls None key, dead max_tokens dedup, single…
cursoragent May 21, 2026
b972ff2
fix(oci): preserve all text parts in generic response and emit SYSTEM…
cursoragent May 21, 2026
18fee3e
fix(oci): normalise dict-format tool_choice to OCI flat uppercase shape
mateo-berri May 21, 2026
3ebb9ef
test(oci): exercise system-message filtering at transform_request bou…
mateo-berri May 21, 2026
b53cf4c
fix(oci/chat): extract tool_choice/response_format helpers to satisfy…
mateo-berri May 21, 2026
0837fe5
fix(oci): normalize None finishReason in generic non-streaming handle…
cursoragent May 21, 2026
0cef51f
fix(oci/generic): silence mypy assignment error on cleared finish_reason
mateo-berri May 21, 2026
6b83508
Merge remote-tracking branch 'origin/litellm_internal_staging' into l…
mateo-berri May 21, 2026
f638fdb
fix(docker): install libatomic in builder for prisma nodeenv binary
mateo-berri May 21, 2026
165d973
fix(oci): raise on invalid tool_choice instead of silently passing Op…
cursoragent May 21, 2026
e992ef6
fix(oci): raise OCIError instead of ValueError in _normalize_tool_choice
cursoragent May 21, 2026
2eb6105
fix(oci/generic): declare non-security intent on sha256 for synthetic…
mateo-berri May 21, 2026
56284fe
fix(oci): simplify _get_optional_params and reject invalid tool_choic…
cursoragent May 21, 2026
8daf8a2
Remove no-op data['stream'] deletion in OCI stream wrappers
cursoragent May 21, 2026
950aafe
fix(oci): always send Cohere isStream field explicitly
cursoragent May 22, 2026
48874fa
fix(oci): revert Cohere isStream to Optional[bool]=None to preserve o…
cursoragent May 22, 2026
ca3eb68
fix(oci/generic): raise OCIError on empty choices instead of IndexError
mateo-berri May 22, 2026
c175808
fix(oci/cohere): map top_k -> topK so Cohere topK param is settable
cursoragent May 22, 2026
e1f74bd
fix(oci): tighten cohere stream dedup flags and forward stream args i…
cursoragent May 22, 2026
ddb50cc
fix(oci/chat): reorder dict guard and wrap stream chunk json.loads
mateo-berri May 22, 2026
0fbb813
fix(oci/cohere stream): only flag text emitted on non-empty content
mateo-berri May 22, 2026
a1a959f
test(oci): end-to-end proxy integration test against real OCI GenAI
fede-kamel May 21, 2026
39e4e93
test(oci): move proxy integration test to tests/integration/
mateo-berri May 22, 2026
b1febaa
fix(oci): dedupe finish-reason mapping and batch Cohere tool results
cursoragent May 22, 2026
6279123
fix(oci): drop dead Cohere toolChoice field and emit GENERIC tool-cal…
cursoragent May 22, 2026
5a94f2d
Merge remote-tracking branch 'origin/litellm_internal_staging' into l…
claude May 23, 2026
94b47a5
fix(docker): drop redundant libatomic from non_root builder
claude May 23, 2026
a2c6856
fix(oci/catalog): add openai.gpt-5{,-mini,-nano} entries with support…
mateo-berri May 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,31 @@ jobs:
uses: github/codeql-action/analyze@ebcb5b36ded6beda4ceefea6a8bc4cc885255bb3 # v3
with:
category: "/language:${{ matrix.language }}"
output: sarif-results
upload: failure-only

# py/weak-sensitive-data-hashing (CWE-328) fires on the OCI signing call at
# litellm/llms/oci/common_utils.py, which hashes the HTTP request body to
# produce the x-content-sha256 header required by the OCI HTTP signing spec —
# a content-integrity hash, not a password or secret hash. SHA-256 is mandated
# by Oracle for this header; see
# https://docs.oracle.com/en-us/iaas/Content/API/Concepts/signingrequests.htm
# The `usedforsecurity=False` flag on the hashlib.sha256 call already declares
# non-security intent, but CodeQL's taint flow still re-fires when callers
# further up the stack are modified. The suppression is scoped to this one
# file/rule pair via SARIF post-filtering so every other callsite of
# py/weak-sensitive-data-hashing in the repository continues to be analyzed.
- name: Filter SARIF (OCI sha256)
if: matrix.language == 'python'
uses: advanced-security/filter-sarif@2da736ff05ef065cb2894ac6892e47b5eac2c3c0 # v1.1
with:
patterns: |
-litellm/llms/oci/common_utils.py:py/weak-sensitive-data-hashing
input: sarif-results/python.sarif
output: sarif-results/python.sarif

- name: Upload SARIF
uses: github/codeql-action/upload-sarif@ebcb5b36ded6beda4ceefea6a8bc4cc885255bb3 # v3
with:
sarif_file: sarif-results
category: "/language:${{ matrix.language }}"
1 change: 1 addition & 0 deletions docker/Dockerfile.non_root
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ RUN for i in 1 2 3; do \
coreutils \
curl \
openssl \
libatomic \
libsndfile \
nodejs && break || sleep 5; \
done
Expand Down
54 changes: 42 additions & 12 deletions litellm/llms/custom_httpx/llm_http_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -890,6 +890,18 @@ def embedding(
headers=headers,
)

# Some providers (e.g. OCI) require request signing after the body is built.
# The default BaseConfig.sign_request returns (headers, None) — a no-op for
# providers that don't need signing.
headers, signed_body = provider_config.sign_request(
headers=headers,
optional_params=optional_params,
request_data=data,
api_base=api_base,
api_key=api_key,
model=model,
)

## LOGGING
logging_obj.pre_call(
input=input,
Expand All @@ -916,6 +928,7 @@ def embedding(
client=client,
optional_params=optional_params,
litellm_params=litellm_params,
signed_body=signed_body,
)

if client is None or not isinstance(client, HTTPHandler):
Expand All @@ -926,12 +939,20 @@ def embedding(
sync_httpx_client = client

try:
response = sync_httpx_client.post(
url=api_base,
headers=headers,
data=json.dumps(data),
timeout=timeout,
)
if signed_body is not None:
response = sync_httpx_client.post(
url=api_base,
headers=headers,
data=signed_body,
timeout=timeout,
)
else:
response = sync_httpx_client.post(
url=api_base,
headers=headers,
data=json.dumps(data),
timeout=timeout,
)
except Exception as e:
raise self._handle_error(
e=e,
Expand Down Expand Up @@ -964,6 +985,7 @@ async def aembedding(
api_key: Optional[str] = None,
timeout: Optional[Union[float, httpx.Timeout]] = None,
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
signed_body: Optional[bytes] = None,
) -> EmbeddingResponse:
if client is None or not isinstance(client, AsyncHTTPHandler):
async_httpx_client = get_async_httpx_client(
Expand All @@ -974,12 +996,20 @@ async def aembedding(
async_httpx_client = client

try:
response = await async_httpx_client.post(
url=api_base,
headers=headers,
json=request_data,
timeout=timeout,
)
if signed_body is not None:
response = await async_httpx_client.post(
url=api_base,
headers=headers,
data=signed_body,
timeout=timeout,
)
else:
response = await async_httpx_client.post(
url=api_base,
headers=headers,
json=request_data,
timeout=timeout,
)
except Exception as e:
raise self._handle_error(e=e, provider_config=provider_config)

Expand Down
Loading
Loading