@code-yeongyu/senpi-ai 2026.10.10-9 → 2026.10.11

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/dist/types.d.ts CHANGED
@@ -690,8 +690,9 @@ export interface Context {
690
690
  tools?: Tool[];
691
691
  /**
692
692
  * Names from `tools` the model may call on this request; absent means every tool is callable.
693
- * Set only for models whose compat declares `supportsAllowedTools`: the adapter keeps `tools`
694
- * byte-stable and restricts callability through `tool_choice` (senpi#2095).
693
+ * Set only for models that `supportsAllowedToolChoice` accepts (the compat flag on a native OpenAI API
694
+ * host): the adapter keeps `tools` byte-stable and restricts callability through `tool_choice`
695
+ * (senpi#2095, senpi#3080).
695
696
  */
696
697
  activeToolNames?: string[];
697
698
  }
@@ -1,6 +1,11 @@
1
1
  import type { Api, Model } from "../types.ts";
2
2
  /** The wire identity a forced tool_choice refusal is remembered under. */
3
3
  export type ForcedToolChoiceTarget = Pick<Model<Api>, "api" | "provider" | "baseUrl" | "id">;
4
+ /**
5
+ * A request refusal: the HTTP 400 that rejects the request, or the same refusal a gateway that has
6
+ * already answered 200 (a keepalive stream) sends in-band before any content (senpi#2801).
7
+ */
8
+ export declare function isRequestRefusal(error: unknown): boolean;
4
9
  /**
5
10
  * Reads `stream` until it has produced content (or ended, or `maxBuffered` contentless events went
6
11
  * by), so a refusal a gateway sends in-band after answering 200 is raised while the request can still
@@ -49,7 +49,7 @@ function markInBandBeforeContent(error) {
49
49
  * A request refusal: the HTTP 400 that rejects the request, or the same refusal a gateway that has
50
50
  * already answered 200 (a keepalive stream) sends in-band before any content (senpi#2801).
51
51
  */
52
- function isRequestRefusal(error) {
52
+ export function isRequestRefusal(error) {
53
53
  const status = extractHttpStatus(error);
54
54
  return status === 400 || (status === undefined && isInBandBeforeContent(error));
55
55
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-yeongyu/senpi-ai",
3
- "version": "2026.10.10-9",
3
+ "version": "2026.10.11",
4
4
  "description": "Unified LLM API with automatic model discovery and provider configuration",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -88,7 +88,7 @@
88
88
  "dependencies": {
89
89
  "@anthropic-ai/sdk": "0.127.0",
90
90
  "@aws-sdk/client-bedrock-runtime": "3.1136.0",
91
- "@earendil-works/pi-telemetry": "npm:@code-yeongyu/senpi-telemetry@2026.10.10-9",
91
+ "@earendil-works/pi-telemetry": "npm:@code-yeongyu/senpi-telemetry@2026.10.11",
92
92
  "@google/genai": "2.23.0",
93
93
  "@smithy/node-http-handler": "4.12.1",
94
94
  "http-proxy-agent": "9.1.0",