@ouro.bot/cli 0.1.0-alpha.115 → 0.1.0-alpha.116

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/changelog.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "_note": "This changelog is maintained as part of the PR/version-bump workflow. Agent-curated, not auto-generated. Agents read this file directly via read_file to understand what changed between versions.",
3
3
  "versions": [
4
+ {
5
+ "version": "0.1.0-alpha.116",
6
+ "changes": [
7
+ "Provider ping now uses a minimal direct API call (max_tokens:1, no thinking/reasoning params) instead of streamTurn, which was adding provider-specific features that could cause 400 errors unrelated to auth."
8
+ ]
9
+ },
4
10
  {
5
11
  "version": "0.1.0-alpha.115",
6
12
  "changes": [
@@ -48,18 +48,6 @@ function createRuntimeForPing(provider, config) {
48
48
  throw new Error(`unsupported provider for ping: ${provider}`);
49
49
  }
50
50
  }
51
- /* v8 ignore start -- no-op stubs: never invoked, ping only needs streamTurn to not throw @preserve */
52
- const noop = () => { };
53
- /* v8 ignore stop */
54
- const noopCallbacks = {
55
- onModelStart: noop,
56
- onModelStreamStart: noop,
57
- onTextChunk: noop,
58
- onReasoningChunk: noop,
59
- onToolStart: noop,
60
- onToolEnd: noop,
61
- onError: noop,
62
- };
63
51
  async function pingProvider(provider, config) {
64
52
  if (hasEmptyCredentials(provider, config)) {
65
53
  return { ok: false, classification: "auth-failure", message: "no credentials configured" };
@@ -82,12 +70,19 @@ async function pingProvider(provider, config) {
82
70
  /* v8 ignore next -- timeout callback: only fires after 10s, tests resolve faster @preserve */
83
71
  const timeout = setTimeout(() => controller.abort(), PING_TIMEOUT_MS);
84
72
  try {
85
- await runtime.streamTurn({
86
- messages: [{ role: "user", content: "ping" }],
87
- activeTools: [],
88
- callbacks: noopCallbacks,
89
- signal: controller.signal,
90
- });
73
+ // Minimal API call — no thinking, no reasoning, no tools.
74
+ // We use the runtime's client directly to avoid provider-specific
75
+ // streamTurn params (adaptive thinking, reasoning effort, phase
76
+ // annotations) that can cause 400 errors unrelated to auth/quota.
77
+ if (provider === "anthropic") {
78
+ const client = runtime.client;
79
+ await client.messages.create({ model: runtime.model, max_tokens: 1, messages: [{ role: "user", content: "ping" }] }, { signal: controller.signal });
80
+ }
81
+ else {
82
+ // OpenAI-compatible providers (azure, codex, minimax, github-copilot)
83
+ const client = runtime.client;
84
+ await client.chat.completions.create({ model: runtime.model, max_tokens: 1, messages: [{ role: "user", content: "ping" }] }, { signal: controller.signal });
85
+ }
91
86
  return { ok: true };
92
87
  }
93
88
  finally {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.115",
3
+ "version": "0.1.0-alpha.116",
4
4
  "main": "dist/heart/daemon/ouro-entry.js",
5
5
  "bin": {
6
6
  "cli": "dist/heart/daemon/ouro-bot-entry.js",