Repository navigation
OracleAgentMemoryManager works OCI-only (signer from the OCI profile); Oracle notebooks carry their own numbers - #369
Merged
Conversation
…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>
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
Bug.
OracleAgentMemoryManagerdefaults to OCI Generative AI models, but litellm'soci/driver (used by Oracle'soracleagentmemoryclient for its embedder and extraction model) does not read~/.oci/config. With a profile or anoci session authenticatetoken the manager failed with Missing required parameters: oci_user, oci_fingerprint, … unless litellm's ownOCI_USER/OCI_KEY_FILEvariables were set.Fix. For
oci/...specs the manager now derives litellm's kwargs itself: a session-token or API-key signer fromOCI_SESSION_PROFILE/OCI_PROFILE(instance and resource principals viaOCI_AUTH_TYPE), plusOCI_REGIONandOCI_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.MemoryExtractionConfigis used whereoracleagentmemoryprovides 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.py6 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.