refactor: rename to openclaw

This commit is contained in:
Peter Steinberger
2026-01-30 03:15:10 +01:00
parent 4583f88626
commit 9a7160786a
2357 changed files with 16688 additions and 16788 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: "moltbot",
model: "openclaw",
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: "moltbot",
model: "openclaw",
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: "moltbot", messages: [{ role: "user", content: "hi" }] },
{ "x-moltbot-agent-id": "beta" },
{ model: "openclaw", messages: [{ role: "user", content: "hi" }] },
{ "x-openclaw-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: "moltbot:beta",
model: "openclaw: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: "moltbot:beta",
model: "openclaw:beta",
messages: [{ role: "user", content: "hi" }],
},
{ "x-moltbot-agent-id": "alpha" },
{ "x-openclaw-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: "moltbot", messages: [{ role: "user", content: "hi" }] },
{ model: "openclaw", messages: [{ role: "user", content: "hi" }] },
{
"x-moltbot-agent-id": "beta",
"x-moltbot-session-key": "agent:beta:openai:custom",
"x-openclaw-agent-id": "beta",
"x-openclaw-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: "moltbot",
model: "openclaw",
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: "moltbot",
model: "openclaw",
messages: [
{
role: "user",
@@ -232,7 +232,7 @@ describe("OpenAI-compatible HTTP API (e2e)", () => {
{
mockAgentOnce([{ text: "I am Claude" }]);
const res = await postChatCompletions(port, {
model: "moltbot",
model: "openclaw",
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: "moltbot",
model: "openclaw",
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: "moltbot",
model: "openclaw",
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: "moltbot",
model: "openclaw",
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: "moltbot",
model: "openclaw",
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: "moltbot",
model: "openclaw",
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: "moltbot",
model: "openclaw",
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: "moltbot",
model: "openclaw",
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: "moltbot",
model: "openclaw",
messages: [{ role: "user", content: "hi" }],
});
expect(fallbackRes.status).toBe(200);