File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- """Integration tests for OCI Generative AI client.
2-
3- These tests require:
1+ """Integration and unit tests for OCI Generative AI client.
2+
3+ All integration tests are validated against the live OCI Generative AI inference
4+ layer (us-chicago-1). The OciClientV2 uses the V2 Cohere API format (COHEREV2)
5+ and communicates with the OCI inference endpoint at:
6+ https://inference.generativeai.{region}.oci.oraclecloud.com
7+
8+ Integration test coverage:
9+
10+ Test Model What it proves
11+ ------------------------------- -------------------------- ------------------------------------------
12+ test_embed_v2 embed-english-v3.0 V2 embed returns 2x 1024-dim vectors
13+ test_embed_with_model_prefix_v2 cohere.embed-english-v3.0 Model normalization works
14+ test_chat_v2 command-a-03-2025 V2 chat returns message
15+ test_chat_stream_v2 command-a-03-2025 V2 SSE streaming with content-delta events
16+ test_config_file_auth embed-english-v3.0 API key auth from config file
17+ test_custom_profile_auth embed-english-v3.0 Custom OCI profile auth
18+ test_embed_english_v3 embed-english-v3.0 1024-dim embeddings
19+ test_embed_multilingual_v3 embed-multilingual-v3.0 Multilingual model works
20+ test_command_a_chat command-a-03-2025 Command A chat via V2
21+ test_invalid_model invalid-model-name Error handling works
22+ test_missing_compartment_id -- Raises TypeError
23+
24+ Requirements:
4251. OCI SDK installed: pip install oci
5262. OCI credentials configured in ~/.oci/config
6273. TEST_OCI environment variable set to run
You can’t perform that action at this time.
0 commit comments