Skip to content

docs(oci-dac): tutorial 40 + empirical Qwen confirmation + website#25

Merged
fede-kamel merged 1 commit into
mainfrom
docs/oci-dac-tutorial-and-website
May 1, 2026
Merged

docs(oci-dac): tutorial 40 + empirical Qwen confirmation + website#25
fede-kamel merged 1 commit into
mainfrom
docs/oci-dac-tutorial-and-website

Conversation

@fede-kamel
Copy link
Copy Markdown
Contributor

Follow-up to #24 (DAC support landed). This wires the full reader-facing story: tutorial, how-to update with empirical Qwen confirmation, README + homepage capability rows, and the bumped tutorial counter.

Tutorial 40 — examples/tutorial_40_oci_dac.py

Five-part walkthrough, live-tested against Luigi's London DAC:

  1. Auto-routing — OCID prefix → SDK transport
  2. Configure — pre-build via get_model() (strict AgentConfig)
  3. complete() — single round-trip against the DAC
  4. stream() — real SSE deltas
  5. Agent + @tool — wiring + honest note on Qwen's <tool_call> text-block format

Live run output

Captured in the how-to page:

=== Part 3: complete() against the DAC ===
Reply:        'I am a large-scale language model developed by Alibaba Cloud, known as Qwen.'
usage:        {'prompt_tokens': 17, 'completion_tokens': 18}
stop_reason:  stop

=== Part 4: stream() against the DAC ===
Streaming reply (chunks shown inline):
  1, 2, 3, 4, 5

What's proven:

  • Routing oci:ocid1.generativeaiendpoint....OCIModel
  • DedicatedServingMode(endpoint_id=...) accepted by the live endpoint ✓
  • Real SSE — chunks arrive as character deltas, not the fallback path ✓
  • Token accounting populated correctly ✓

What's flagged honestly:

  • Qwen on this DAC emits tool calls as <tool_call>{...}</tool_call> text blocks, not OpenAI-style structured tool_calls. Two remediation paths (deploy-side flag or caller-side post-process) documented in the how-to.

Surface updates

  • docs/how-to/oci-dac.md — new "Confirmed working — Qwen on a London DAC" section with the run output and the tool-call format note.
  • README.md capability grid: new 🏗 OCI Dedicated AI Cluster row.
  • README.md tutorials: counter 39 → 40, new OCI track row covering 29 + 40.
  • docs/index.md capability grid: same DAC row added.
  • docs/index.md tutorials: counter 39 → 40, tutorial 40 added to Track-5.

Validation

  • 3205 unit tests pass, no regressions.
  • hatch run check clean.
  • Tutorial runs cleanly in mock mode (no env) and live mode (OCI_DAC_* env vars set).

Privacy

No tenancy / endpoint OCIDs in the codebase. The tutorial reads them from env vars; the how-to references only the region.

Adds the runnable end-to-end tutorial and threads the DAC story
through every reader-facing surface, with one piece of empirical
evidence: locus actually drove a real Qwen DAC in uk-london-1.

What ships
----------
- ``examples/tutorial_40_oci_dac.py`` — 5-part walkthrough:
    1. Auto-routing (OCID prefix → SDK transport).
    2. Configure an Agent against a DAC (pre-build via ``get_model``
       because ``Agent``'s strict ``AgentConfig`` rejects
       provider-specific kwargs on the keyword path).
    3. ``complete()`` against the DAC.
    4. ``stream()`` against the DAC — real SSE deltas.
    5. ``Agent`` + ``@tool`` against the DAC, with an honest note on
       Qwen's ``<tool_call>`` text-block format vs OpenAI's
       structured ``tool_calls`` and the two ways to fix it.

  Live-tested against Luigi's London DAC. Sample output captured in
  the how-to page.

- ``docs/how-to/oci-dac.md`` — adds the "Confirmed working — Qwen
  on a London DAC" section with the actual run output (model
  identification, token usage, streaming chunks). Documents the
  Qwen ``<tool_call>`` quirk and the two remediation paths.

- ``README.md`` capability grid: new ``🏗 OCI Dedicated AI Cluster``
  row linking to the how-to page.

- ``README.md`` tutorials section: tutorial counter 39 → 40, new
  ``OCI`` track row covering 29 + 40.

- ``docs/index.md`` capability grid: same DAC row added.

- ``docs/index.md`` tutorials section: counter 39 → 40 and tutorial
  40 added to the Track-5 production list.

Run output (with the DAC env vars set)
--------------------------------------
- Part 3: complete() — "I am a large-scale language model developed
  by Alibaba Cloud, known as Qwen." (17 / 18 tokens)
- Part 4: stream() — real SSE deltas: "1, 2, 3, 4, 5".
- Part 5: agent + tool — Qwen emits ``<tool_call>`` text block;
  documented as a model-side rather than locus-side limitation.

Validation
----------
- 3205 unit tests pass, no regressions.
- ``hatch run check`` clean.
- Tutorial runs cleanly in mock mode (no env vars) and live mode
  (with OCI_DAC_* env vars).

Privacy
-------
No tenancy / endpoint OCIDs are committed — the tutorial reads
them from env vars. The how-to references the test endpoint by
region only.

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 May 1, 2026
@fede-kamel fede-kamel merged commit d0ed14f into main May 1, 2026
10 checks passed
@fede-kamel fede-kamel deleted the docs/oci-dac-tutorial-and-website branch May 13, 2026 04:29
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