refactor: rename clawdbot to moltbot with legacy compat

This commit is contained in:
Peter Steinberger
2026-01-27 12:19:58 +00:00
parent 83460df96f
commit 6d16a658e5
1839 changed files with 11250 additions and 11199 deletions

View File

@@ -67,7 +67,7 @@ describe("OpenAI-compatible HTTP API (e2e)", () => {
const server = await startServerWithDefaultConfig(port);
try {
const res = await postChatCompletions(port, {
model: "clawdbot",
model: "moltbot",
messages: [{ role: "user", content: "hi" }],
});
expect(res.status).toBe(404);
@@ -83,7 +83,7 @@ describe("OpenAI-compatible HTTP API (e2e)", () => {
});
try {
const res = await postChatCompletions(port, {
model: "clawdbot",
model: "moltbot",
messages: [{ role: "user", content: "hi" }],
});
expect(res.status).toBe(404);
@@ -124,8 +124,8 @@ describe("OpenAI-compatible HTTP API (e2e)", () => {
mockAgentOnce([{ text: "hello" }]);
const res = await postChatCompletions(
port,
{ model: "clawdbot", messages: [{ role: "user", content: "hi" }] },
{ "x-clawdbot-agent-id": "beta" },
{ model: "moltbot", messages: [{ role: "user", content: "hi" }] },
{ "x-moltbot-agent-id": "beta" },
);
expect(res.status).toBe(200);
@@ -140,7 +140,7 @@ describe("OpenAI-compatible HTTP API (e2e)", () => {
{
mockAgentOnce([{ text: "hello" }]);
const res = await postChatCompletions(port, {
model: "clawdbot:beta",
model: "moltbot:beta",
messages: [{ role: "user", content: "hi" }],
});
expect(res.status).toBe(200);
@@ -158,10 +158,10 @@ describe("OpenAI-compatible HTTP API (e2e)", () => {
const res = await postChatCompletions(
port,
{
model: "clawdbot:beta",
model: "moltbot:beta",
messages: [{ role: "user", content: "hi" }],
},
{ "x-clawdbot-agent-id": "alpha" },
{ "x-moltbot-agent-id": "alpha" },
);
expect(res.status).toBe(200);
@@ -177,10 +177,10 @@ describe("OpenAI-compatible HTTP API (e2e)", () => {
mockAgentOnce([{ text: "hello" }]);
const res = await postChatCompletions(
port,
{ model: "clawdbot", messages: [{ role: "user", content: "hi" }] },
{ model: "moltbot", messages: [{ role: "user", content: "hi" }] },
{
"x-clawdbot-agent-id": "beta",
"x-clawdbot-session-key": "agent:beta:openai:custom",
"x-moltbot-agent-id": "beta",
"x-moltbot-session-key": "agent:beta:openai:custom",
},
);
expect(res.status).toBe(200);
@@ -196,7 +196,7 @@ describe("OpenAI-compatible HTTP API (e2e)", () => {
mockAgentOnce([{ text: "hello" }]);
const res = await postChatCompletions(port, {
user: "alice",
model: "clawdbot",
model: "moltbot",
messages: [{ role: "user", content: "hi" }],
});
expect(res.status).toBe(200);
@@ -211,7 +211,7 @@ describe("OpenAI-compatible HTTP API (e2e)", () => {
{
mockAgentOnce([{ text: "hello" }]);
const res = await postChatCompletions(port, {
model: "clawdbot",
model: "moltbot",
messages: [
{
role: "user",
@@ -232,7 +232,7 @@ describe("OpenAI-compatible HTTP API (e2e)", () => {
{
mockAgentOnce([{ text: "I am Claude" }]);
const res = await postChatCompletions(port, {
model: "clawdbot",
model: "moltbot",
messages: [
{ role: "system", content: "You are a helpful assistant." },
{ role: "user", content: "Hello, who are you?" },
@@ -255,7 +255,7 @@ describe("OpenAI-compatible HTTP API (e2e)", () => {
{
mockAgentOnce([{ text: "hello" }]);
const res = await postChatCompletions(port, {
model: "clawdbot",
model: "moltbot",
messages: [
{ role: "system", content: "You are a helpful assistant." },
{ role: "user", content: "Hello" },
@@ -274,7 +274,7 @@ describe("OpenAI-compatible HTTP API (e2e)", () => {
{
mockAgentOnce([{ text: "hello" }]);
const res = await postChatCompletions(port, {
model: "clawdbot",
model: "moltbot",
messages: [
{ role: "developer", content: "You are a helpful assistant." },
{ role: "user", content: "Hello" },
@@ -292,7 +292,7 @@ describe("OpenAI-compatible HTTP API (e2e)", () => {
{
mockAgentOnce([{ text: "ok" }]);
const res = await postChatCompletions(port, {
model: "clawdbot",
model: "moltbot",
messages: [
{ role: "system", content: "You are a helpful assistant." },
{ role: "user", content: "What's the weather?" },
@@ -316,7 +316,7 @@ describe("OpenAI-compatible HTTP API (e2e)", () => {
mockAgentOnce([{ text: "hello" }]);
const res = await postChatCompletions(port, {
stream: false,
model: "clawdbot",
model: "moltbot",
messages: [{ role: "user", content: "hi" }],
});
expect(res.status).toBe(200);
@@ -331,7 +331,7 @@ describe("OpenAI-compatible HTTP API (e2e)", () => {
{
const res = await postChatCompletions(port, {
model: "clawdbot",
model: "moltbot",
messages: [{ role: "system", content: "yo" }],
});
expect(res.status).toBe(400);
@@ -359,7 +359,7 @@ describe("OpenAI-compatible HTTP API (e2e)", () => {
const res = await postChatCompletions(port, {
stream: true,
model: "clawdbot",
model: "moltbot",
messages: [{ role: "user", content: "hi" }],
});
expect(res.status).toBe(200);
@@ -392,7 +392,7 @@ describe("OpenAI-compatible HTTP API (e2e)", () => {
const repeatedRes = await postChatCompletions(port, {
stream: true,
model: "clawdbot",
model: "moltbot",
messages: [{ role: "user", content: "hi" }],
});
expect(repeatedRes.status).toBe(200);
@@ -417,7 +417,7 @@ describe("OpenAI-compatible HTTP API (e2e)", () => {
const fallbackRes = await postChatCompletions(port, {
stream: true,
model: "clawdbot",
model: "moltbot",
messages: [{ role: "user", content: "hi" }],
});
expect(fallbackRes.status).toBe(200);