mirror of
https://github.com/ollama/ollama.git
synced 2026-01-18 20:39:13 -05:00
Compare commits
2 Commits
parth/decr
...
hoyyeva/ad
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5aee34db9f | ||
|
|
32393f11d7 |
@@ -25,7 +25,7 @@ declare module "@/gotypes" {
|
||||
}
|
||||
|
||||
Model.prototype.isCloud = function (): boolean {
|
||||
return this.model.endsWith("cloud");
|
||||
return this.model.endsWith("cloud") || this.model === "gemini-3-pro-preview";
|
||||
};
|
||||
|
||||
// Helper function to convert Uint8Array to base64
|
||||
|
||||
@@ -14,8 +14,8 @@ describe("Model merging logic", () => {
|
||||
const merged = mergeModels(localModels);
|
||||
|
||||
// First verify cloud models are first and in FEATURED_MODELS order
|
||||
const cloudModels = FEATURED_MODELS.filter((m: string) =>
|
||||
m.endsWith("cloud"),
|
||||
const cloudModels = FEATURED_MODELS.filter(
|
||||
(m: string) => m.endsWith("cloud") || m === "gemini-3-pro-preview",
|
||||
);
|
||||
for (let i = 0; i < cloudModels.length; i++) {
|
||||
expect(merged[i].model).toBe(cloudModels[i]);
|
||||
@@ -24,7 +24,7 @@ describe("Model merging logic", () => {
|
||||
|
||||
// Then verify non-cloud featured models are next and in FEATURED_MODELS order
|
||||
const nonCloudFeatured = FEATURED_MODELS.filter(
|
||||
(m: string) => !m.endsWith("cloud"),
|
||||
(m: string) => !m.endsWith("cloud") && m !== "gemini-3-pro-preview",
|
||||
);
|
||||
for (let i = 0; i < nonCloudFeatured.length; i++) {
|
||||
const model = merged[i + cloudModels.length];
|
||||
@@ -54,9 +54,9 @@ describe("Model merging logic", () => {
|
||||
const cloudModels = merged.filter((m) => m.isCloud());
|
||||
expect(cloudModels.length).toBe(0);
|
||||
|
||||
// Should have non-cloud featured models
|
||||
// Should have non-cloud featured models (excluding gemini-3-pro-preview which is treated as cloud)
|
||||
const nonCloudFeatured = FEATURED_MODELS.filter(
|
||||
(m) => !m.endsWith("cloud"),
|
||||
(m) => !m.endsWith("cloud") && m !== "gemini-3-pro-preview",
|
||||
);
|
||||
for (let i = 0; i < nonCloudFeatured.length; i++) {
|
||||
const model = merged[i];
|
||||
@@ -74,7 +74,9 @@ describe("Model merging logic", () => {
|
||||
const merged = mergeModels([]);
|
||||
|
||||
// First verify cloud models are first and in FEATURED_MODELS order
|
||||
const cloudModels = FEATURED_MODELS.filter((m) => m.endsWith("cloud"));
|
||||
const cloudModels = FEATURED_MODELS.filter(
|
||||
(m) => m.endsWith("cloud") || m === "gemini-3-pro-preview",
|
||||
);
|
||||
for (let i = 0; i < cloudModels.length; i++) {
|
||||
expect(merged[i].model).toBe(cloudModels[i]);
|
||||
expect(merged[i].isCloud()).toBe(true);
|
||||
@@ -82,7 +84,7 @@ describe("Model merging logic", () => {
|
||||
|
||||
// Then verify non-cloud featured models are next and in FEATURED_MODELS order
|
||||
const nonCloudFeatured = FEATURED_MODELS.filter(
|
||||
(m) => !m.endsWith("cloud"),
|
||||
(m) => !m.endsWith("cloud") && m !== "gemini-3-pro-preview",
|
||||
);
|
||||
for (let i = 0; i < nonCloudFeatured.length; i++) {
|
||||
const model = merged[i + cloudModels.length];
|
||||
@@ -104,7 +106,9 @@ describe("Model merging logic", () => {
|
||||
const merged = mergeModels(localModels);
|
||||
|
||||
// First verify cloud models are first and in FEATURED_MODELS order
|
||||
const cloudModels = FEATURED_MODELS.filter((m) => m.endsWith("cloud"));
|
||||
const cloudModels = FEATURED_MODELS.filter(
|
||||
(m) => m.endsWith("cloud") || m === "gemini-3-pro-preview",
|
||||
);
|
||||
for (let i = 0; i < cloudModels.length; i++) {
|
||||
expect(merged[i].model).toBe(cloudModels[i]);
|
||||
expect(merged[i].isCloud()).toBe(true);
|
||||
@@ -112,7 +116,7 @@ describe("Model merging logic", () => {
|
||||
|
||||
// Then verify non-cloud featured models are next and in FEATURED_MODELS order
|
||||
const nonCloudFeatured = FEATURED_MODELS.filter(
|
||||
(m) => !m.endsWith("cloud"),
|
||||
(m) => !m.endsWith("cloud") && m !== "gemini-3-pro-preview",
|
||||
);
|
||||
for (let i = 0; i < nonCloudFeatured.length; i++) {
|
||||
const model = merged[i + cloudModels.length];
|
||||
|
||||
@@ -4,6 +4,7 @@ import { Model } from "@/gotypes";
|
||||
export const FEATURED_MODELS = [
|
||||
"gpt-oss:120b-cloud",
|
||||
"gpt-oss:20b-cloud",
|
||||
"gemini-3-pro-preview",
|
||||
"deepseek-v3.1:671b-cloud",
|
||||
"qwen3-coder:480b-cloud",
|
||||
"qwen3-vl:235b-cloud",
|
||||
@@ -40,7 +41,9 @@ export function mergeModels(
|
||||
const cloudModels = [...allModels.filter((m) => m.isCloud())];
|
||||
|
||||
// Add any cloud models from FEATURED_MODELS that aren't in local models
|
||||
FEATURED_MODELS.filter((f) => f.endsWith("cloud")).forEach((cloudModel) => {
|
||||
FEATURED_MODELS.filter(
|
||||
(f) => f.endsWith("cloud") || f === "gemini-3-pro-preview",
|
||||
).forEach((cloudModel) => {
|
||||
if (!cloudModels.some((m) => m.model === cloudModel)) {
|
||||
cloudModels.push(new Model({ model: cloudModel }));
|
||||
}
|
||||
@@ -48,7 +51,7 @@ export function mergeModels(
|
||||
|
||||
// 2. Get other featured models (non-cloud)
|
||||
const featuredModels = FEATURED_MODELS.filter(
|
||||
(f) => !f.endsWith("cloud"),
|
||||
(f) => !f.endsWith("cloud") && f !== "gemini-3-pro-preview",
|
||||
).map((model) => {
|
||||
// Check if this model exists in local models
|
||||
const localMatch = allModels.find(
|
||||
|
||||
Reference in New Issue
Block a user