@nathapp/nax-agent 0.91.7-canary.6 → 0.91.7-canary.7

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/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@ All notable changes to `@nathapp/nax-agent` are recorded here. The format follow
4
4
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). While the version is `0.x`, a minor
5
5
  release may change the public API.
6
6
 
7
+ ## [0.91.7-canary.7] - 2026-10-29
8
+
9
+ - No changes in this package. Released in lockstep with the other nax packages.
10
+
7
11
  ## [0.91.7-canary.6] - 2026-10-28
8
12
 
9
13
  - No changes in this package. Released in lockstep with the other nax packages.
@@ -95,7 +95,7 @@ export interface CatalogModelOverride {
95
95
  * Thinking wire format for an `openai-completions` model (nax#2696).
96
96
  * Mirrored from nax-ai's ThinkingFormat; omit to inherit the provider's format.
97
97
  */
98
- thinkingFormat?: "openai" | "qwen" | "qwen-chat-template" | "deepseek" | "zai";
98
+ thinkingFormat?: "openai" | "qwen" | "qwen-chat-template" | "deepseek" | "zai" | "openrouter";
99
99
  }
100
100
  /** Provider-scoped catalog overrides — maps 1:1 onto nax-ai's `ProviderOverride[]`. */
101
101
  export interface ProviderCatalogOverride {
@@ -105,6 +105,10 @@ export interface ProviderCatalogOverride {
105
105
  * not to `models` individually, despite sitting alongside a model list.
106
106
  */
107
107
  baseUrl?: string;
108
+ /** Environment variable supplying a custom provider's bearer credential. */
109
+ authEnv?: string;
110
+ /** Config/precheck opt-in only; never forwarded to nax-ai or enforced here. */
111
+ allowInsecureHttp?: boolean;
108
112
  /** Provider-wide extra request headers (nax#2019). May carry credentials. */
109
113
  headers?: Record<string, string>;
110
114
  models: CatalogModelOverride[];
@@ -16,6 +16,8 @@ export declare function isProtocolStreamError(err: unknown): err is {
16
16
  export declare const _adapterDeps: {
17
17
  listStoredProviders: typeof listStoredProviders;
18
18
  anyAmbientCredential: typeof anyAmbientCredential;
19
+ /** Environment lookup for custom providers not covered by pi's ambient probe. */
20
+ readEnv: (name: string) => string | undefined;
19
21
  /**
20
22
  * US-004: whether the global auth config points at an exec helper. Injectable
21
23
  * so a test can pin the credential-source decision without writing
@@ -12,6 +12,8 @@ export function isProtocolStreamError(err) {
12
12
  export const _adapterDeps = {
13
13
  listStoredProviders,
14
14
  anyAmbientCredential,
15
+ /** Environment lookup for custom providers not covered by pi's ambient probe. */
16
+ readEnv: (name) => process.env[name],
15
17
  /**
16
18
  * US-004: whether the global auth config points at an exec helper. Injectable
17
19
  * so a test can pin the credential-source decision without writing
@@ -103,6 +103,7 @@ export function toProviderOverrides(overrides) {
103
103
  // `!== undefined` as a declaration and checks it against the protocol
104
104
  // entries (nax#2019).
105
105
  ...(override.baseUrl !== undefined ? { baseUrl: override.baseUrl } : {}),
106
+ ...(override.authEnv !== undefined ? { authEnv: override.authEnv } : {}),
106
107
  // Copied, not aliased: nax-ai's client catalog assigns this reference
107
108
  // straight onto ResolvedProvider.headers (providers/catalog.ts) without a
108
109
  // copy of its own, so forwarding the live config object would let a later
@@ -128,6 +128,9 @@ export class NativeSessionAdapter {
128
128
  return true;
129
129
  if ((await _adapterDeps.listStoredProviders()).length > 0)
130
130
  return true;
131
+ if (this.catalogOverrides.some((override) => override.authEnv !== undefined && !!_adapterDeps.readEnv(override.authEnv))) {
132
+ return true;
133
+ }
131
134
  return await _adapterDeps.anyAmbientCredential();
132
135
  }
133
136
  catch {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nathapp/nax-agent",
3
- "version": "0.91.7-canary.6",
3
+ "version": "0.91.7-canary.7",
4
4
  "description": "nax's native coding agent: session contract, native loop, tools, permissions, sandbox, command-safety.",
5
5
  "license": "MIT",
6
6
  "author": "William Khoo",
@@ -47,7 +47,7 @@
47
47
  "dependencies": {
48
48
  "@anthropic-ai/sandbox-runtime": "0.0.77",
49
49
  "@modelcontextprotocol/sdk": "^1.32.1",
50
- "@nathapp/nax-ai": "0.91.7-canary.6",
50
+ "@nathapp/nax-ai": "0.91.7-canary.7",
51
51
  "zod": "^4.3.6"
52
52
  },
53
53
  "publishConfig": {