Skip to content

OracleAgentMemoryManager works OCI-only (signer from the OCI profile); Oracle notebooks carry their own numbers - #369

Merged
fede-kamel merged 1 commit into
mainfrom
fix/oam-oci-auth-notebook-numbers
Oct 27, 2026
Merged

fede-kamel merged 1 commit into
mainfrom
fix/oam-oci-auth-notebook-numbers

Conversation

@fede-kamel

Copy link
Copy Markdown
Member

Summary

Bug. OracleAgentMemoryManager defaults to OCI Generative AI models, but litellm's oci/ driver (used by Oracle's oracleagentmemory client for its embedder and extraction model) does not read ~/.oci/config. With a profile or an oci session authenticate token the manager failed with Missing required parameters: oci_user, oci_fingerprint, … unless litellm's own OCI_USER / OCI_KEY_FILE variables were set.

Fix. For oci/... specs the manager now derives litellm's kwargs itself: a session-token or API-key signer from OCI_SESSION_PROFILE / OCI_PROFILE (instance and resource principals via OCI_AUTH_TYPE), plus OCI_REGION and OCI_COMPARTMENT_ID. litellm's own variables, when set, stay in charge; litellm_kwargs= overrides everything; oci_litellm_auth() is public for code that builds the client directly. MemoryExtractionConfig is used where oracleagentmemory provides it (26.8 deprecates the inline flag).

Notebooks. 44 is OCI-only by default and its diagnostic probe uses the same auth. 36–43 still carried titles, banners, self-filenames and table names from an earlier numbering; they now carry their own numbers and their cross-references point at the current ones.

Verification

Live Autonomous Database 26ai in eu-frankfurt-1, session-token profile, no OpenAI key: notebooks 37–44 pass (44 recalls the preference in a new thread through Oracle agent memory); tests/integration/test_oracle_rag.py 6 passed / 1 skipped (OpenAI-embedding variant). Unit tests for the manager (new: test_oracle_agent_memory_oci_auth.py), mypy and ruff clean; docs tests and strict build clean.

…s carry their own numbers

OracleAgentMemoryManager defaults to oci/cohere.embed-v4.0 and
oci/openai.gpt-4.1, but litellm's oci/ driver (which oracleagentmemory's
Embedder and Llm wrap) does not read ~/.oci/config, so on any machine
that authenticates with an OCI profile or `oci session authenticate`
token the manager failed with "Missing required parameters: oci_user,
oci_fingerprint, ...". For oci/... specs the manager now derives the
litellm kwargs itself: a SecurityTokenSigner or API-key Signer from the
profile named by OCI_SESSION_PROFILE / OCI_PROFILE (instance and
resource principals via OCI_AUTH_TYPE), plus OCI_REGION and
OCI_COMPARTMENT_ID. litellm's own OCI_USER / OCI_KEY_FILE variables,
when set, are left in charge; `litellm_kwargs=` overrides everything;
`oci_litellm_auth()` is public for callers that build the client
directly. The manager passes MemoryExtractionConfig where
oracleagentmemory provides it instead of the deprecated inline flag.

Notebook 44 is OCI-only by default (LOCUS_OAM_EMBEDDER / LOCUS_OAM_LLM
still switch providers), its diagnostic probe uses the same auth, and
its docstring, banner, thread ids and table prefix carry its own
number. Notebooks 36 to 43 still carried titles, banners, self-filenames
and table names from an earlier numbering (02, 03, 04, 05, 06, 07, 09,
10, 12, 37, 80); they now say 36 to 43, and their cross-references point
at the current numbers.

Verified against a live Autonomous Database 26ai in eu-frankfurt-1 with
a session-token profile and no OpenAI key: notebooks 37 to 44 pass
(44 recalls Alice's preference in a new thread through Oracle agent
memory); the Oracle RAG integration suite passes (6, 1 skip for the
OpenAI-embedding variant); unit tests, mypy and ruff clean.

Signed-off-by: Federico Kamelhar <federico.kamelhar@oracle.com>
@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Oct 27, 2026
@fede-kamel
fede-kamel merged commit 77cc760 into main Oct 27, 2026
16 checks passed
@fede-kamel
fede-kamel deleted the fix/oam-oci-auth-notebook-numbers branch October 27, 2026 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant