Skip to content

Commit eac98ac

Browse files
krukowCopilot
andcommitted
Update examples: rename secret→code word, gpt-5.2→gpt-5.4
- session_resume.clj: replace 'secret word' with 'code word' to avoid model content filtering that disrupted the demo - All examples and docs: update gpt-5.2 references to gpt-5.4 - BYOK docs: use gpt-5.3-codex (no gpt-5.4-codex exists yet) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 05bd2cd commit eac98ac

24 files changed

+128
-128
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Discover available models and their billing multipliers:
111111
(doseq [m (copilot/list-models client)]
112112
(println (:id m) (str "x" (get-in m [:model-billing :multiplier])))))
113113
;; prints:
114-
;; gpt-5.2 x1.0
114+
;; gpt-5.4 x1.0
115115
;; claude-sonnet-4.5 x1.0
116116
;; o1 x2.0
117117
;; ...
@@ -235,7 +235,7 @@ const client = new CopilotClient();
235235
await client.start();
236236

237237
const session = await client.createSession({
238-
model: "gpt-5.2",
238+
model: "gpt-5.4",
239239
tools: [
240240
defineTool("greet", {
241241
description: "Greet someone",

doc/api/API.html

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -114,29 +114,29 @@ <h4><a href="#create-session" id="create-session"></a><code>create-session</code
114114
</code></pre>
115115
<p>Create a new conversation session.</p>
116116
<h4><a href="#with-session" id="with-session"></a><code>with-session</code></h4>
117-
<pre><code class="language-clojure">(copilot/with-session [session client {:model "gpt-5.2"}]
117+
<pre><code class="language-clojure">(copilot/with-session [session client {:model "gpt-5.4"}]
118118
;; use session
119119
)
120120
</code></pre>
121121
<p>Create a session and ensure <code>destroy!</code> runs on exit.</p>
122122
<h4><a href="#with-client-session" id="with-client-session"></a><code>with-client-session</code></h4>
123123
<pre><code class="language-clojure">;; Form 1: [session session-opts] - anonymous client with default options
124-
(copilot/with-client-session [session {:model "gpt-5.2"}]
124+
(copilot/with-client-session [session {:model "gpt-5.4"}]
125125
;; use session
126126
)
127127

128128
;; Form 2: [client-opts session session-opts] - anonymous client with custom options
129-
(copilot/with-client-session [{:log-level :debug} session {:model "gpt-5.2"}]
129+
(copilot/with-client-session [{:log-level :debug} session {:model "gpt-5.4"}]
130130
;; use session
131131
)
132132

133133
;; Form 3: [client session session-opts] - named client with default options
134-
(copilot/with-client-session [client session {:model "gpt-5.2"}]
134+
(copilot/with-client-session [client session {:model "gpt-5.4"}]
135135
;; use client and session
136136
)
137137

138138
;; Form 4: [client client-opts session session-opts] - named client with custom options
139-
(copilot/with-client-session [client {:log-level :debug} session {:model "gpt-5.2"}]
139+
(copilot/with-client-session [client {:log-level :debug} session {:model "gpt-5.4"}]
140140
;; use client and session
141141
)
142142
</code></pre>
@@ -148,7 +148,7 @@ <h4><a href="#with-client-session" id="with-client-session"></a><code>with-clien
148148
</thead>
149149
<tbody>
150150
<tr><td> <code>:session-id</code> </td><td> string </td><td> Custom session ID (optional) </td></tr>
151-
<tr><td> <code>:model</code> </td><td> string </td><td> Model to use (<code>"gpt-5.2"</code>, <code>"claude-sonnet-4.5"</code>, etc.) </td></tr>
151+
<tr><td> <code>:model</code> </td><td> string </td><td> Model to use (<code>"gpt-5.4"</code>, <code>"claude-sonnet-4.5"</code>, etc.) </td></tr>
152152
<tr><td> <code>:tools</code> </td><td> vector </td><td> Custom tools exposed to the CLI </td></tr>
153153
<tr><td> <code>:system-message</code> </td><td> map </td><td> System message customization (see below) </td></tr>
154154
<tr><td> <code>:available-tools</code> </td><td> vector </td><td> List of allowed tool names </td></tr>
@@ -210,11 +210,11 @@ <h4><a href="#list-models" id="list-models"></a><code>list-models</code></h4>
210210
<pre><code class="language-clojure">(copilot/list-models client)
211211
</code></pre>
212212
<p>List available models with their metadata. Results are cached per client connection. Requires authentication. Returns a vector of model info maps:</p>
213-
<pre><code class="language-clojure">[{:id "gpt-5.2"
213+
<pre><code class="language-clojure">[{:id "gpt-5.4"
214214
:name "GPT-5.2"
215215
:vendor "openai"
216-
:family "gpt-5.2"
217-
:version "gpt-5.2"
216+
:family "gpt-5.4"
217+
:version "gpt-5.4"
218218
:max-input-tokens 128000
219219
:max-output-tokens 16384
220220
:preview? false
@@ -397,7 +397,7 @@ <h4><a href="#workspace-path" id="workspace-path"></a><code>workspace-path</code
397397
<p>Get the session workspace path when provided by the CLI (may be nil).</p>
398398
<h4><a href="#session-config" id="session-config"></a><code>session-config</code></h4>
399399
<pre><code class="language-clojure">(copilot/session-config session)
400-
;; =&gt; {:model "gpt-5.2", :streaming? true, :reasoning-effort "high", ...}
400+
;; =&gt; {:model "gpt-5.4", :streaming? true, :reasoning-effort "high", ...}
401401
</code></pre>
402402
<p>Get the configuration that was used to create this session.</p>
403403
<h4><a href="#client" id="client"></a><code>client</code></h4>
@@ -491,7 +491,7 @@ <h3><a href="#example-handling-events" id="example-handling-events"></a>Example:
491491
<h2><a href="#streaming" id="streaming"></a>Streaming</h2>
492492
<p>Enable streaming to receive assistant response chunks as they’re generated:</p>
493493
<pre><code class="language-clojure">(def session (copilot/create-session client
494-
{:model "gpt-5.2"
494+
{:model "gpt-5.4"
495495
:streaming? true}))
496496

497497
(let [ch (chan 100)]
@@ -551,7 +551,7 @@ <h3><a href="#tools" id="tools"></a>Tools</h3>
551551
(copilot/result-success issue)))}))
552552

553553
(def session (copilot/create-session client
554-
{:model "gpt-5.2"
554+
{:model "gpt-5.4"
555555
:tools [lookup-tool]}))
556556
</code></pre>
557557
<p>When Copilot invokes <code>lookup_issue</code>, the SDK automatically runs your handler and responds to the CLI.</p>
@@ -575,7 +575,7 @@ <h3><a href="#tools" id="tools"></a>Tools</h3>
575575
<h3><a href="#system-message-customization" id="system-message-customization"></a>System Message Customization</h3>
576576
<p>Control the system prompt:</p>
577577
<pre><code class="language-clojure">(def session (copilot/create-session client
578-
{:model "gpt-5.2"
578+
{:model "gpt-5.4"
579579
:system-message
580580
{:content "
581581
&lt;workflow_rules&gt;
@@ -587,14 +587,14 @@ <h3><a href="#system-message-customization" id="system-message-customization"></
587587
<p>The SDK auto-injects environment context, tool instructions, and security guardrails. Your <code>:content</code> is appended after SDK-managed sections.</p>
588588
<p>For full control (removes all guardrails), use <code>:mode :replace</code>:</p>
589589
<pre><code class="language-clojure">(copilot/create-session client
590-
{:model "gpt-5.2"
590+
{:model "gpt-5.4"
591591
:system-message {:mode :replace
592592
:content "You are a helpful assistant."}})
593593
</code></pre>
594594
<h3><a href="#config-directory-and-skills" id="config-directory-and-skills"></a>Config Directory and Skills</h3>
595595
<p><code>config-dir</code> overrides where the CLI reads its config and state (e.g., <code>~/.copilot</code>). It does not define custom agents. Custom agents are provided via <code>:custom-agents</code>.</p>
596596
<pre><code class="language-clojure">(def session (copilot/create-session client
597-
{:model "gpt-5.2"
597+
{:model "gpt-5.4"
598598
:config-dir "/tmp/copilot-config"
599599
:skill-directories ["/path/to/skills" "/opt/team-skills"]
600600
:disabled-skills ["legacy-skill" "experimental-skill"]}))
@@ -605,7 +605,7 @@ <h3><a href="#large-tool-output-handling-experimental" id="large-tool-output-han
605605
</blockquote>
606606
<p>Configure how large tool outputs are handled before being sent back to the model:</p>
607607
<pre><code class="language-clojure">(def session (copilot/create-session client
608-
{:model "gpt-5.2"
608+
{:model "gpt-5.4"
609609
:large-output {:enabled true
610610
:max-size-bytes 65536
611611
:output-dir "/tmp/copilot-tool-output"}}))
@@ -624,18 +624,18 @@ <h3><a href="#infinite-sessions" id="infinite-sessions"></a>Infinite Sessions</h
624624
<p>Infinite sessions enable automatic context compaction, allowing conversations to continue beyond the model’s context window limit. When the context approaches capacity, the CLI automatically compacts older messages while preserving important context.</p>
625625
<pre><code class="language-clojure">;; Enable with defaults (enabled by default)
626626
(def session (copilot/create-session client
627-
{:model "gpt-5.2"}))
627+
{:model "gpt-5.4"}))
628628

629629
;; Explicit configuration
630630
(def session (copilot/create-session client
631-
{:model "gpt-5.2"
631+
{:model "gpt-5.4"
632632
:infinite-sessions {:enabled true
633633
:background-compaction-threshold 0.80
634634
:buffer-exhaustion-threshold 0.95}}))
635635

636636
;; Disable infinite sessions
637637
(def session (copilot/create-session client
638-
{:model "gpt-5.2"
638+
{:model "gpt-5.4"
639639
:infinite-sessions {:enabled false}}))
640640
</code></pre>
641641
<p><strong>Configuration options:</strong></p>
@@ -690,7 +690,7 @@ <h3><a href="#permission-handling" id="permission-handling"></a>Permission Handl
690690
<h3><a href="#user-input-handling" id="user-input-handling"></a>User Input Handling</h3>
691691
<p>When the agent needs input from the user (via <code>ask_user</code> tool), the <code>:on-user-input-request</code> handler is called. Return a response map with the user’s input:</p>
692692
<pre><code class="language-clojure">(def session (copilot/create-session client
693-
{:model "gpt-5.2"
693+
{:model "gpt-5.4"
694694
:on-user-input-request
695695
(fn [request invocation]
696696
;; request contains {:question "..." :choices [...] :allow-freeform true/false}
@@ -707,7 +707,7 @@ <h3><a href="#user-input-handling" id="user-input-handling"></a>User Input Handl
707707
<h3><a href="#session-hooks" id="session-hooks"></a>Session Hooks</h3>
708708
<p>Lifecycle hooks allow custom logic at various points during the session:</p>
709709
<pre><code class="language-clojure">(def session (copilot/create-session client
710-
{:model "gpt-5.2"
710+
{:model "gpt-5.4"
711711
:hooks
712712
{:on-pre-tool-use
713713
(fn [input invocation]
@@ -762,7 +762,7 @@ <h3><a href="#reasoning-effort" id="reasoning-effort"></a>Reasoning Effort</h3>
762762
:reasoning-effort "high"})) ; "low", "medium", "high", or "xhigh"
763763
</code></pre>
764764
<h3><a href="#multiple-sessions" id="multiple-sessions"></a>Multiple Sessions</h3>
765-
<pre><code class="language-clojure">(def session1 (copilot/create-session client {:model "gpt-5.2"}))
765+
<pre><code class="language-clojure">(def session1 (copilot/create-session client {:model "gpt-5.4"}))
766766
(def session2 (copilot/create-session client {:model "claude-sonnet-4.5"}))
767767

768768
;; Both sessions are independent

doc/api/byok.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ <h2><a href="#quick-start-azure-ai-foundry" id="quick-start-azure-ai-foundry"></
2020
(require '[github.copilot-sdk.helpers :as h])
2121

2222
(copilot/with-client-session [session
23-
{:model "gpt-5.2-codex"
23+
{:model "gpt-5.3-codex"
2424
:provider {:provider-type :openai
2525
:base-url "https://your-resource.openai.azure.com/openai/v1/"
2626
:wire-api :responses
@@ -29,7 +29,7 @@ <h2><a href="#quick-start-azure-ai-foundry" id="quick-start-azure-ai-foundry"></
2929
</code></pre>
3030
<h2><a href="#quick-start-openai-direct" id="quick-start-openai-direct"></a>Quick Start: OpenAI Direct</h2>
3131
<pre><code class="language-clojure">(copilot/with-client-session [session
32-
{:model "gpt-5.2"
32+
{:model "gpt-5.4"
3333
:provider {:provider-type :openai
3434
:base-url "https://api.openai.com/v1"
3535
:api-key (System/getenv "OPENAI_API_KEY")}}]
@@ -88,15 +88,15 @@ <h3><a href="#provider-type-notes" id="provider-type-notes"></a>Provider-Type No
8888
<h2><a href="#example-configurations" id="example-configurations"></a>Example Configurations</h2>
8989
<h3><a href="#azure-openai-native-azure-endpoint" id="azure-openai-native-azure-endpoint"></a>Azure OpenAI (Native Azure Endpoint)</h3>
9090
<p>Use <code>:azure</code> type for endpoints at <code>*.openai.azure.com</code>:</p>
91-
<pre><code class="language-clojure">{:model "gpt-5.2"
91+
<pre><code class="language-clojure">{:model "gpt-5.4"
9292
:provider {:provider-type :azure
9393
:base-url "https://my-resource.openai.azure.com"
9494
:api-key (System/getenv "AZURE_OPENAI_KEY")
9595
:azure-options {:azure-api-version "2024-10-21"}}}
9696
</code></pre>
9797
<h3><a href="#azure-ai-foundry-openai-compatible-endpoint" id="azure-ai-foundry-openai-compatible-endpoint"></a>Azure AI Foundry (OpenAI-Compatible Endpoint)</h3>
9898
<p>For Azure AI Foundry deployments with <code>/openai/v1/</code> endpoints, use <code>:openai</code>:</p>
99-
<pre><code class="language-clojure">{:model "gpt-5.2-codex"
99+
<pre><code class="language-clojure">{:model "gpt-5.3-codex"
100100
:provider {:provider-type :openai
101101
:base-url "https://your-resource.openai.azure.com/openai/v1/"
102102
:api-key (System/getenv "FOUNDRY_API_KEY")
@@ -132,7 +132,7 @@ <h3><a href="#model-not-specified-error" id="model-not-specified-error"></a>“M
132132
{:provider {:provider-type :openai :base-url "..."}}
133133

134134
;; ✅ Correct: Model specified
135-
{:model "gpt-5.2"
135+
{:model "gpt-5.4"
136136
:provider {:provider-type :openai :base-url "..."}}
137137
</code></pre>
138138
<h3><a href="#azure-endpoint-type-confusion" id="azure-endpoint-type-confusion"></a>Azure Endpoint Type Confusion</h3>

doc/api/debugging.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ <h3><a href="#enable-debug-logging" id="enable-debug-logging"></a>Enable Debug L
1616
<p>Use the client’s <code>:log-level :debug</code> to see MCP communication:</p>
1717
<pre><code class="language-clojure">(copilot/with-client-session [{:log-level :debug}
1818
session
19-
{:model "gpt-5.2"
19+
{:model "gpt-5.4"
2020
:mcp-servers {"my-server" {:mcp-command "/path/to/server"
2121
:mcp-args []
2222
:mcp-tools ["*"]}}}]
@@ -169,7 +169,7 @@ <h3><a href="#monitoring-mcp-events-in-clojure" id="monitoring-mcp-events-in-clo
169169
<p>Subscribe to tool execution events to observe MCP tool calls:</p>
170170
<pre><code class="language-clojure">(require '[clojure.core.async :refer [chan tap go-loop &lt;!]])
171171

172-
(copilot/with-client-session [session {:model "gpt-5.2"
172+
(copilot/with-client-session [session {:model "gpt-5.4"
173173
:mcp-servers {"my-server" {:mcp-command "server"
174174
:mcp-args []
175175
:mcp-tools ["*"]}}}]

doc/api/getting-started.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ <h2><a href="#step-2-send-your-first-message" id="step-2-send-your-first-message
4040
<p>For more control, use the explicit client/session API:</p>
4141
<pre><code class="language-clojure">(require '[github.copilot-sdk :as copilot])
4242

43-
(copilot/with-client-session [session {:model "gpt-5.2"}]
43+
(copilot/with-client-session [session {:model "gpt-5.4"}]
4444
(let [response (copilot/send-and-wait! session {:prompt "What is 2 + 2?"})]
4545
(println (get-in response [:data :content]))))
4646
</code></pre>
@@ -67,7 +67,7 @@ <h3><a href="#using-coreasync-channels" id="using-coreasync-channels"></a>Using
6767
<pre><code class="language-clojure">(require '[clojure.core.async :refer [chan tap go-loop &lt;!]])
6868
(require '[github.copilot-sdk :as copilot])
6969

70-
(copilot/with-client-session [session {:model "gpt-5.2" :streaming? true}]
70+
(copilot/with-client-session [session {:model "gpt-5.4" :streaming? true}]
7171
(let [ch (chan 256)
7272
done (promise)]
7373
(tap (copilot/events session) ch)
@@ -121,7 +121,7 @@ <h2><a href="#step-4-add-a-custom-tool" id="step-4-add-a-custom-tool"></a>Step 4
121121
(copilot/result-success
122122
(str city ": " temp "°F and " condition))))}))
123123

124-
(copilot/with-client-session [session {:model "gpt-5.2"
124+
(copilot/with-client-session [session {:model "gpt-5.4"
125125
:tools [get-weather]}]
126126
(println (h/query "What's the weather like in Seattle and Tokyo?"
127127
:session session)))
@@ -144,7 +144,7 @@ <h2><a href="#step-5-build-an-interactive-assistant" id="step-5-build-an-interac
144144
(copilot/result-success
145145
(str city ": " temp "°F and " condition))))}))
146146

147-
(copilot/with-client-session [session {:model "gpt-5.2"
147+
(copilot/with-client-session [session {:model "gpt-5.4"
148148
:streaming? true
149149
:tools [get-weather]}]
150150
(println "🌤️ Weather Assistant (type 'exit' to quit)")

0 commit comments

Comments
 (0)