Skip to content

feat: add stream in defaultCompletionOptions yaml #5818

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/config-yaml/src/__tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ describe("E2E Scenarios", () => {
);

// Test that packages were correctly unrolled and params replaced
expect(unrolledConfig.models?.length).toBe(3);
expect(unrolledConfig.models?.length).toBe(4);

const openAiModel = unrolledConfig.models?.[0]!;
expect(openAiModel.apiKey).toBe("sk-123");
Expand All @@ -163,6 +163,10 @@ describe("E2E Scenarios", () => {
anthropicSecretLocation,
);

const proxyOllamaModel = unrolledConfig.models?.[3]!;
expect(proxyOllamaModel.provider).toBe('ollama')
expect(proxyOllamaModel.defaultCompletionOptions?.stream).toBe(false);

expect(unrolledConfig.rules?.length).toBe(2);
expect(unrolledConfig.docs?.[0]?.startUrl).toBe(
"https://docs.python.org/release/3.13.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,9 @@ models:
- uses: test-org/claude35sonnet
with:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}

- name: proxy-ollama
provider: ollama
model: llama3.1
defaultCompletionOptions:
stream: false
1 change: 1 addition & 0 deletions packages/config-yaml/src/schemas/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export const completionOptionsSchema = z.object({
reasoning: z.boolean().optional(),
reasoningBudgetTokens: z.number().optional(),
promptCaching: z.boolean().optional(),
stream: z.boolean().optional()
});
export type CompletionOptions = z.infer<typeof completionOptionsSchema>;

Expand Down
Loading