Skip to content

Commit 8b24072

Browse files
Use max input token defaults (#10951)
Addresses #8133 We're currently using a hardcoded `0` value for max input tokens rather than our `DEFAULT_MAX_TOKEN_INPUT` value. I'm not sure if this was done intentionally, but this change switches the value to use our constant
1 parent c1e9ff0 commit 8b24072

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

extensions/positron-assistant/src/models.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ abstract class AILanguageModel implements positron.ai.LanguageModelChatProvider
658658
provider: this.provider,
659659
providerName: this.providerName,
660660
capabilities: this.capabilities,
661-
defaultMaxInput: model.maxInputTokens ?? 0,
661+
defaultMaxInput: model.maxInputTokens ?? DEFAULT_MAX_TOKEN_INPUT,
662662
defaultMaxOutput: model.maxOutputTokens ?? DEFAULT_MAX_TOKEN_OUTPUT
663663
})
664664
);
@@ -815,7 +815,7 @@ export class OpenAILanguageModel extends AILanguageModel implements positron.ai.
815815
provider: this.provider,
816816
providerName: this.providerName,
817817
capabilities: this.capabilities,
818-
defaultMaxInput: modelDef.maxInputTokens ?? 0,
818+
defaultMaxInput: modelDef.maxInputTokens ?? DEFAULT_MAX_TOKEN_INPUT,
819819
defaultMaxOutput: modelDef.maxOutputTokens ?? DEFAULT_MAX_TOKEN_OUTPUT
820820
})
821821
);
@@ -841,7 +841,7 @@ export class OpenAILanguageModel extends AILanguageModel implements positron.ai.
841841
provider: this.provider,
842842
providerName: this.providerName,
843843
capabilities: this.capabilities,
844-
defaultMaxInput: 0,
844+
defaultMaxInput: model.maxInputTokens ?? DEFAULT_MAX_TOKEN_INPUT,
845845
defaultMaxOutput: model.maxOutputTokens ?? DEFAULT_MAX_TOKEN_OUTPUT
846846
})
847847
);

0 commit comments

Comments
 (0)