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
9 changes: 9 additions & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,21 +80,23 @@
"tar": "^7.5.1"
},
"dependencies": {
"@corbits/openai-responses": "github:corbitsdev/corbits-openai-responses",
"@corbits/xai-provider": "github:corbitsdev/corbits-xai-provider",
"@intx/agent": "workspace:*",
"@intx/authz": "workspace:*",
"@intx/crypto": "0.3.0",
"@intx/harness": "workspace:*",
"@intx/hub-sessions": "0.3.0",
"@intx/inference": "workspace:*",
"@intx/log": "workspace:*",
"@intx/mail-memory": "0.3.0",
"@intx/mailbox": "workspace:*",
"@intx/mime": "workspace:*",
"@intx/storage-isogit": "workspace:*",
"@intx/tools-lsp": "0.3.0",
"@intx/tools-posix": "workspace:*",
"@intx/mailbox": "workspace:*",
"@intx/harness": "workspace:*",
"@intx/mime": "workspace:*",
"@intx/mail-memory": "0.3.0",
"@intx/hub-sessions": "0.3.0",
"@intx/workflow-host": "0.3.0",
"@intx/types": "workspace:*",
"@intx/workflow-host": "0.3.0",
"@modelcontextprotocol/sdk": "^1.29.0",
"@opentui/core": "0.5.10",
"arktype": "catalog:",
Expand Down
6 changes: 3 additions & 3 deletions src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ import {
GROK_RESPONSES_PROVIDER,
GROK_SESSION_ID_OPTION,
GROK_USER_ID_OPTION,
} from "../provider/grok-responses-adapter.js";
} from "../provider/grok-responses.js";
import { BIFROST_PROVIDER } from "../provider/bifrost-adapter.js";
import { isOllamaProviderId, ollamaOpenAIBaseURL } from "../provider/ollama.js";
import { selectableGoModelIds } from "../provider/opencode-go-models.js";
import {
OPENAI_RESPONSES_PROVIDER,
OPENAI_SESSION_ID_OPTION,
OPENCODE_SESSION_ID_OPTION,
} from "../provider/openai-responses-adapter.js";
} from "../provider/openai-responses.js";
import { OPENCODE_SESSION_ID_OPTION } from "../provider/opencode-session.js";
import { OPENCODE_GO_MESSAGES_PROVIDER } from "../provider/opencode-go-anthropic-adapter.js";
import { xaiUserIdFromAccessToken } from "../auth/xai/session.js";
import {
Expand Down
278 changes: 0 additions & 278 deletions src/provider/grok-responses-adapter.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, expect, test } from "bun:test";
import type { ConversationTurn, LastCycleSource } from "@intx/types/runtime";
import { createGrokResponsesAdapter } from "./grok-responses-adapter.js";
import { createGrokResponsesAdapter } from "./grok-responses.js";

const source: LastCycleSource = {
sourceId: "xai/test",
Expand Down Expand Up @@ -196,4 +196,30 @@ describe("createGrokResponsesAdapter", () => {
).toBe(1_500);
expect(adapter.extractRetryAfterMs?.(new Headers({}))).toBeUndefined();
});

test("treats Responses completed, incomplete, and done events as stream-terminal", () => {
const adapter = createGrokResponsesAdapter(source);
const isStreamTerminal = adapter.isStreamTerminal;
expect(typeof isStreamTerminal).toBe("function");
if (typeof isStreamTerminal !== "function") {
throw new Error("expected isStreamTerminal to be a function");
}
for (const type of [
"response.completed",
"response.incomplete",
"response.done",
]) {
expect(isStreamTerminal(JSON.stringify({ type }))).toBe(true);
}
for (const type of [
"response.output_text.delta",
"response.created",
"response.in_progress",
]) {
expect(isStreamTerminal(JSON.stringify({ type }))).toBe(false);
}
expect(isStreamTerminal("{not json")).toBe(false);
expect(isStreamTerminal("null")).toBe(false);
expect(isStreamTerminal('"just a string"')).toBe(false);
});
});
Loading
Loading