Client -> GoModel -> Oracle Generative AI
Before you start
- Create an Oracle Generative AI API key.
- Add an OCI IAM policy for
generativeaiapikey. - Choose a supported Oracle region and model.
- Decide whether you want env-only
ORACLE_MODELSor YAMLmodels:.
1. Add the OCI policy
For a simple test setup, this tenancy-level policy is enough:2. Set the Oracle endpoint and API key
Use Oracle’s OpenAI-compatible inference base URL for your region. For Chicago:3. Configure Oracle in GoModel
For the default singleoracle provider, env-only configuration is enough:
ORACLE_MODELS is a comma-separated list. GoModel trims whitespace around each
entry and uses the list as the fallback inventory when Oracle’s /models
endpoint is unavailable.
Use a YAML provider block when you want a custom provider name, multiple Oracle
providers, or prefer to keep the model list in config.yaml:
models: matters:
- Oracle inference works through
chat/completionsandresponses - Oracle’s
/modelsendpoint may not be available for this API-key flow - GoModel can fall back to the configured model list when
/modelsis unavailable
ORACLE_MODELS overrides YAML models: for the default
oracle provider.
Current status
What is integrated today:- Oracle’s OpenAI-compatible inference endpoints
- manual model configuration through
ORACLE_MODELSormodels: - GoModel
/v1/modelsfrom the configured-model fallback
- Oracle’s OpenAI-compatible
/modelsendpoint for automatic model discovery
- native Oracle model auto-discovery through OCI APIs
- automatic population of the Oracle model inventory without
ORACLE_MODELSormodels:
/models endpoint for this API-key flow, or
GoModel adds a separate OCI-native discovery path, this manual fallback
configuration requirement can be relaxed.
4. Start GoModel
5. Verify the model registry
- a
200 OK - a model such as
openai.gpt-oss-120bwithowned_by: "oracle"
6. Verify Responses
- a
200 OK - final output text containing
ok
7. Verify Chat Completions
max_tokens budget. Some Oracle-backed reasoning models can
spend short completions on reasoning content before emitting final assistant
text.
Troubleshooting
404 Authorization failed or requested resource not foundUsually means the Generative AI API key policy is missing, the region is wrong, or the model is not available to the account.model registry has no modelsSetORACLE_MODELSor addmodels:to the Oracle provider config so GoModel can use the fallback.- OCI CLI works but Oracle bearer requests fail These are different auth flows. OCI CLI uses API signing keys; Oracle Generative AI inference uses the Generative AI bearer API key.
References
- Oracle API keys overview: https://docs.oracle.com/en-us/iaas/Content/generative-ai/api-keys.htm
- Oracle API key permissions: https://docs.oracle.com/en-us/iaas/Content/generative-ai/add-api-permission.htm
- Oracle OpenAI-compatible endpoint: https://docs.oracle.com/en-us/iaas/Content/generative-ai/oci-openai.htm