Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -255,3 +255,4 @@ examples/start_and_test.sh
# Old tutorials directory (superseded by examples/tutorial_*.py)
tutorials/
site/
.claude/
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def book_flight(flight_id: str, customer_id: str) -> dict:
return billing.charge_and_book(flight_id, customer_id)

agent = Agent(
model="oci:openai.gpt-5.5",
model="oci:openai.gpt-5",
tools=[search_flights, book_flight],
system_prompt="You are a travel concierge. Find a flight, then book it.",
reflexion=True, # self-correct mid-run
Expand Down Expand Up @@ -191,7 +191,7 @@ def book_meeting(date: str, attendees: list[str]) -> dict:
return calendar.book(date, attendees)

agent = Agent(
model="oci:openai.gpt-5.5",
model="oci:openai.gpt-5",
tools=[get_today_date, book_meeting],
system_prompt="You are a scheduling assistant.",
)
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/agent-loop.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ def submit_po(vendor_id: str, amount_usd: float) -> dict:
return finance.submit(vendor_id, amount_usd)

agent = Agent(
model="oci:openai.gpt-5.5",
model="oci:openai.gpt-5",
tools=[search_vendors, submit_po],
system_prompt="You are a procurement officer.",
reflexion=True, # turn Reflect on
Expand Down
4 changes: 2 additions & 2 deletions docs/concepts/agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ from locus import Agent
from locus.agent import AgentConfig

cfg = AgentConfig(
model="oci:openai.gpt-5.5", # see how-to/oci-models.md
model="oci:openai.gpt-5", # see how-to/oci-models.md
tools=[...],
system_prompt="...",
max_iterations=50,
Expand Down Expand Up @@ -118,7 +118,7 @@ class VendorList(BaseModel):
vendors: list[str]

agent = Agent(
model="oci:openai.gpt-5.5",
model="oci:openai.gpt-5",
tools=[search, book_flight],
output_schema=VendorList,
termination=MaxIterations(8) | ToolCalled("book_flight"),
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/conversation-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ from locus import Agent
from locus.memory.backends import OCIBucketBackend

agent = Agent(
model="oci:openai.gpt-5.5",
model="oci:openai.gpt-5",
tools=[...],
checkpointer=OCIBucketBackend(
bucket_name="locus-threads",
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/executors.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ time**:

```python
agent = Agent(
model="oci:openai.gpt-5.5",
model="oci:openai.gpt-5",
tools=[search_flights, search_hotels, search_restaurants],
tool_execution="concurrent", # default — fan out
# tool_execution="sequential", # opt-in — one at a time
Expand Down
4 changes: 2 additions & 2 deletions docs/concepts/interrupts.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def submit_po(vendor_id: str, amount_usd: float) -> dict:
return finance.submit(vendor_id, amount_usd)

agent = Agent(
model="oci:openai.gpt-5.5",
model="oci:openai.gpt-5",
tools=[search_vendors, request_human_approval, submit_po],
system_prompt=(
"You are a procurement officer. "
Expand Down Expand Up @@ -78,7 +78,7 @@ from locus.hooks.builtin.steering import SteeringHook
agent = Agent(
...,
hooks=[SteeringHook(
judge_model="oci:openai.gpt-5.5-mini",
judge_model="oci:openai.gpt-5-mini",
policy="Reject any tool call that doesn't match the user's stated request.",
)],
)
Expand Down
4 changes: 2 additions & 2 deletions docs/concepts/models.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ A model is a string. Pick the provider's prefix; locus picks the
client.

```python
agent = Agent(model="oci:openai.gpt-5.5", ...) # OCI → V1
agent = Agent(model="oci:openai.gpt-5", ...) # OCI → V1
agent = Agent(model="oci:cohere.command-r-plus", ...) # OCI → SDK
agent = Agent(model="oci:meta.llama-3.3-70b-instruct", ...) # OCI → V1
agent = Agent(model="openai:gpt-4o", ...) # OpenAI direct
Expand Down Expand Up @@ -96,7 +96,7 @@ from locus.models.pooled import PooledModel

agent = Agent(
model=PooledModel(
primary="oci:openai.gpt-5.5",
primary="oci:openai.gpt-5",
fallbacks=["openai:gpt-4o", "anthropic:claude-sonnet"],
),
...,
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/multi-agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ compliance = Specialist(name="compliance", agent=compliance_agent,
description="Vets vendors against SOC2 / ISO posture.")

orchestrator = Orchestrator(
coordinator_model="oci:openai.gpt-5.5",
coordinator_model="oci:openai.gpt-5",
specialists=[procurement, compliance],
system_prompt="You are the procurement lead. Delegate to the right specialist.",
)
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/multi-agent/a2a.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ from locus import Agent
from locus.a2a.protocol import A2AServer, AgentCard

research_agent = Agent(
model="oci:openai.gpt-5.5",
model="oci:openai.gpt-5",
tools=[search_corpus, summarise, cite],
system_prompt="You read the vendor catalogue and quote prices.",
checkpointer=OCIBucketBackend(bucket_name="research-threads"),
Expand Down
8 changes: 4 additions & 4 deletions docs/concepts/multi-agent/handoff.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ State, checkpointer, and `thread_id` survive.
from locus.multiagent import Handoff

triage = Agent(
model="oci:openai.gpt-5.5",
model="oci:openai.gpt-5",
tools=[lookup_order, lookup_account],
system_prompt=(
"You triage incoming customer messages. "
Expand All @@ -64,17 +64,17 @@ triage = Agent(
),
)
billing = Agent(
model="oci:openai.gpt-5.5",
model="oci:openai.gpt-5",
tools=[issue_refund, retry_charge],
system_prompt="You handle billing escalations.",
)
shipping = Agent(
model="oci:openai.gpt-5.5",
model="oci:openai.gpt-5",
tools=[track_shipment, request_redelivery],
system_prompt="You handle shipping issues.",
)
returns = Agent(
model="oci:openai.gpt-5.5",
model="oci:openai.gpt-5",
tools=[create_return_label],
system_prompt="You handle returns.",
)
Expand Down
8 changes: 4 additions & 4 deletions docs/concepts/multi-agent/orchestrator.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ from locus.multiagent import Orchestrator, Specialist
procurement = Specialist(
name="procurement",
agent=Agent(
model="oci:openai.gpt-5.5",
model="oci:openai.gpt-5",
tools=[search_vendors, quote_prices],
system_prompt="You are the Procurement specialist.",
),
Expand All @@ -54,7 +54,7 @@ procurement = Specialist(
compliance = Specialist(
name="compliance",
agent=Agent(
model="oci:openai.gpt-5.5",
model="oci:openai.gpt-5",
tools=[check_soc2, check_iso, search_legal_terms],
system_prompt="You are the Compliance specialist.",
),
Expand All @@ -64,15 +64,15 @@ compliance = Specialist(
approver = Specialist(
name="approver",
agent=Agent(
model="oci:openai.gpt-5.5",
model="oci:openai.gpt-5",
tools=[submit_po, email_cfo], # ← idempotent writes
system_prompt="You are the Approval Officer.",
),
description="Submits the PO and notifies the CFO. Only after approval.",
)

orchestrator = Orchestrator(
coordinator_model="oci:openai.gpt-5.5",
coordinator_model="oci:openai.gpt-5",
specialists=[procurement, compliance, approver],
system_prompt=(
"You are the procurement lead. Delegate research to procurement, "
Expand Down
6 changes: 3 additions & 3 deletions docs/concepts/multi-agent/swarm.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ exits when the queue empties or `max_iterations` is hit.
from locus.multiagent import Swarm

researcher = Agent(
model="oci:openai.gpt-5.5",
model="oci:openai.gpt-5",
tools=[search_corpus, summarise],
system_prompt="You are a researcher. Read, summarise, post follow-ups.",
)
fact_checker = Agent(
model="oci:openai.gpt-5.5",
model="oci:openai.gpt-5",
tools=[verify_claim, search_corpus],
system_prompt="You are a fact-checker. Verify claims, flag conflicts.",
)
writer = Agent(
model="oci:openai.gpt-5.5",
model="oci:openai.gpt-5",
tools=[draft, revise],
system_prompt="You are a writer. Take vetted summaries, draft prose.",
)
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/prompts.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ You don't usually configure 2 and 3 directly. You configure 1.

```python
agent = Agent(
model="oci:openai.gpt-5.5",
model="oci:openai.gpt-5",
tools=[search_flights, book_flight],
system_prompt=(
"You are a travel concierge. "
Expand Down
4 changes: 2 additions & 2 deletions docs/concepts/providers/oci.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ you know about prompting OpenAI carries over: real SSE streaming,
OpenAI-style function calling, structured output, vision input.

```python
agent = Agent(model="oci:openai.gpt-5.5") # OpenAI commercial
agent = Agent(model="oci:openai.gpt-5") # OpenAI commercial
agent = Agent(model="oci:meta.llama-3.3-70b-instruct") # Meta Llama
agent = Agent(model="oci:anthropic.claude-sonnet") # Claude — no Anthropic key needed
```
Expand Down Expand Up @@ -155,7 +155,7 @@ export OCI_REGION=us-chicago-1
from locus import Agent

agent = Agent(
model="oci:openai.gpt-5.5",
model="oci:openai.gpt-5",
system_prompt="You are a helpful assistant.",
)
```
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/providers/ollama.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ swap one line to point at OCI / OpenAI / Anthropic for production.
agent = Agent(model="ollama:llama3.3", tools=[...], system_prompt="...")

# Production — same agent, swap the model id:
agent = Agent(model="oci:openai.gpt-5.5", tools=[...], system_prompt="...")
agent = Agent(model="oci:openai.gpt-5", tools=[...], system_prompt="...")
```

Everything else — tools, hooks, checkpointers, termination, RAG —
Expand Down
10 changes: 5 additions & 5 deletions docs/concepts/providers/openai.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ That's the only setup. locus reads the env var automatically.
```python
from locus import Agent

agent = Agent(model="openai:gpt-5.5", system_prompt="You are helpful.")
agent = Agent(model="openai:gpt-5", system_prompt="You are helpful.")
```

The string `"openai:gpt-5.5"` does two things: tells locus to use the
The string `"openai:gpt-5"` does two things: tells locus to use the
OpenAI provider (`openai:` prefix), and which model id to call
(`gpt-5.5`). Any model id OpenAI accepts, locus accepts.
(`gpt-5`). Any model id OpenAI accepts, locus accepts.

### 3. Run it

Expand All @@ -55,7 +55,7 @@ without further configuration.

### Chat completions across the GPT family

Every chat-shaped OpenAI model: `gpt-4o`, `gpt-4.1`, `gpt-5`, `gpt-5.5`,
Every chat-shaped OpenAI model: `gpt-4o`, `gpt-4.1`, `gpt-5`, `gpt-5`,
`gpt-image-1`. Vision input (image URLs / base64), audio input, and
function calling work the same way you'd use them on the OpenAI SDK
directly — locus just normalises the events the model emits.
Expand Down Expand Up @@ -107,7 +107,7 @@ class Answer(BaseModel):
confidence: float

agent = Agent(
model="openai:gpt-5.5",
model="openai:gpt-5",
output_schema=Answer,
system_prompt="Reply as JSON matching the schema.",
)
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/reasoning.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ single argument on `Agent(...)`.

```python
agent = Agent(
model="oci:openai.gpt-5.5",
model="oci:openai.gpt-5",
tools=[search, summarise, validate_claim],
reflexion=True, # self-evaluate per turn
grounding=True, # LLM-as-judge claim verification
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/retry.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ from locus.hooks.builtin.retry import ModelRetryHook
from locus import Agent

agent = Agent(
model="oci:openai.gpt-5.5",
model="oci:openai.gpt-5",
tools=[...],
hooks=[
ModelRetryHook(
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/safety.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ agent = Agent(
tools=[search, send_email, transfer],
hooks=[
SteeringHook(
judge_model="oci:openai.gpt-5.5-mini",
judge_model="oci:openai.gpt-5-mini",
policy="The user came in to ask about flights. Reject any tool call unrelated to flights.",
),
],
Expand Down
2 changes: 1 addition & 1 deletion docs/how-to/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ from locus.server import AgentServer
from locus.memory.backends import OCIBucketBackend

agent = Agent(
model="oci:openai.gpt-5.5",
model="oci:openai.gpt-5",
tools=[...],
system_prompt="...",
checkpointer=OCIBucketBackend(
Expand Down
4 changes: 2 additions & 2 deletions docs/how-to/oci-dac.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

OCI GenAI exposes two serving modes:

- **On-demand** — pay-per-token against a shared model id (`openai.gpt-5.5`,
`cohere.command-r-plus-08-2024`, …). What `Agent(model="oci:openai.gpt-5.5")`
- **On-demand** — pay-per-token against a shared model id (`openai.gpt-5`,
`cohere.command-r-plus-08-2024`, …). What `Agent(model="oci:openai.gpt-5")`
has been using by default.
- **Dedicated AI Cluster (DAC)** — provisioned capacity exposed as a
*generative AI endpoint* OCID
Expand Down
14 changes: 7 additions & 7 deletions docs/how-to/oci-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ from locus import Agent
from locus.models import OCIOpenAIModel

model = OCIOpenAIModel(
model="openai.gpt-5.5",
model="openai.gpt-5",
profile="DEFAULT", # any [profile] in ~/.oci/config
)

Expand All @@ -51,7 +51,7 @@ import os
from locus.models import OCIOpenAIModel

model = OCIOpenAIModel(
model="openai.gpt-5.5",
model="openai.gpt-5",
auth_type="instance_principal", # or "resource_principal"
compartment_id=os.environ["OCI_COMPARTMENT_ID"],
)
Expand All @@ -68,7 +68,7 @@ identity.
- **Real SSE streaming** — `agent.run(...)` yields events as the model
produces tokens, not after the full response arrives.
- **Day-0 model coverage** — when OCI publishes a new model id (e.g.
`openai.gpt-5.5` on launch day), it works immediately. No `oci`
`openai.gpt-5` on launch day), it works immediately. No `oci`
package release needed.
- **Standard OpenAI request shape** — tool calls, system messages,
multimodal content, and seed/penalty/top_p knobs work the same way as
Expand Down Expand Up @@ -101,7 +101,7 @@ an OCI-side limitation of the legacy endpoint, not a locus issue.
from locus.models import get_model

# Uses OCIOpenAIModel
m1 = get_model("oci:openai.gpt-5.5", profile="DEFAULT")
m1 = get_model("oci:openai.gpt-5", profile="DEFAULT")

# Uses OCIModel (Cohere R-series)
m2 = get_model("oci:cohere.command-r-plus", profile_name="DEFAULT", auth_type="api_key")
Expand Down Expand Up @@ -131,9 +131,9 @@ side-by-side.
- **OpenAI Responses API on OCI.** Locus deliberately stays on
chat/completions — the Responses API is built around server-side
conversation state which conflicts with locus's own memory and tool
layers. Practical consequence: `openai.gpt-5.5-pro` (Responses-only on
layers. Practical consequence: `openai.gpt-5-pro` (Responses-only on
OCI per the day-0 announcement) is not reachable from locus today.
Regular `openai.gpt-5.5` works fine on V1.
Regular `openai.gpt-5` works fine on V1.
- **Cohere R-series on V1.** OCI's `/openai/v1` returns `400 Unsupported
OpenAI operation` for these. Use `OCIModel`.
- **GenAI API key auth (Bearer token).** A "create an API key in the
Expand All @@ -148,7 +148,7 @@ side-by-side.
# V1 path (any non-Cohere-R model)
OCI_PROFILE=DEFAULT \
OCI_REGION=us-chicago-1 \
OCI_MODEL_ID=openai.gpt-5.5 \
OCI_MODEL_ID=openai.gpt-5 \
pytest tests/integration/test_oci_openai_compat_integration.py

# SDK path (Cohere R-series)
Expand Down
Loading
Loading