diff --git a/README.md b/README.md index 9c54974..45025f0 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ The official Requesty extension for the Pi Coding Agent ## (Recommended) Install from Github Repo ```bash -pi install git:github.com/requestyai/pi-requesty@c28e2f8 +pi install git:github.com/requestyai/pi-requesty@c28e2f8208eb467d248a7dc33bfb5cb04f310575 ``` NOTE: Version c28e2f8 points to out latest v0.2.7 version, and keeps you safe from supply chain attack. diff --git a/requesty.js b/requesty.js index 5ab8906..cfb44ae 100644 --- a/requesty.js +++ b/requesty.js @@ -76,6 +76,8 @@ async function discoverModels(provider) { name: typeof model.name === "string" && model.name.length > 0 ? model.name : model.id, reasoning: model.supports_reasoning === true, input: model.supports_vision === true ? ["text", "image"] : ["text"], + // non-anthropic/ models must use OpenAI format regardless of provider api setting + ...(!model.id.startsWith("anthropic/") && { api: "openai-completions" }), cost: { input: pricePerMillionTokens(model.input_price), output: pricePerMillionTokens(model.output_price), @@ -106,6 +108,7 @@ function updateModelsJson(data, models) { name: model.name, reasoning: model.reasoning, input: model.input, + ...(model.api && { api: model.api }), cost: model.cost, contextWindow: model.contextWindow, maxTokens: model.maxTokens,