fix: respect web search SecretRef credentials

This commit is contained in:
Peter Steinberger
2026-04-18 18:57:42 +01:00
parent 438799e929
commit 7474b52584
3 changed files with 88 additions and 6 deletions

View File

@@ -78,8 +78,8 @@ describe("xai web search config resolution", () => {
expect(resolveXaiWebSearchModel(searchConfig)).toBe("grok-4-fast");
});
it("treats unresolved non-env SecretRefs as missing credentials instead of throwing", async () => {
await withEnvAsync({ XAI_API_KEY: undefined }, async () => {
it("treats unresolved non-env SecretRefs as missing credentials instead of using env fallback", async () => {
await withEnvAsync({ XAI_API_KEY: "ambient-xai-test-key" }, async () => {
const provider = createXaiWebSearchProvider();
const maybeTool = provider.createTool({
config: {